summaryrefslogtreecommitdiff
path: root/devel/bmake/files/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'devel/bmake/files/hash.c')
-rw-r--r--devel/bmake/files/hash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/devel/bmake/files/hash.c b/devel/bmake/files/hash.c
index 5651bfeba0b..2c3b130f65a 100644
--- a/devel/bmake/files/hash.c
+++ b/devel/bmake/files/hash.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.1.1.4 2009/09/18 20:55:26 joerg Exp $ */
+/* $NetBSD: hash.c,v 1.1.1.5 2015/05/19 21:36:44 joerg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.1.1.4 2009/09/18 20:55:26 joerg Exp $";
+static char rcsid[] = "$NetBSD: hash.c,v 1.1.1.5 2015/05/19 21:36:44 joerg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: hash.c,v 1.1.1.4 2009/09/18 20:55:26 joerg Exp $");
+__RCSID("$NetBSD: hash.c,v 1.1.1.5 2015/05/19 21:36:44 joerg Exp $");
#endif
#endif /* not lint */
#endif
@@ -221,6 +221,9 @@ Hash_FindEntry(Hash_Table *t, const char *key)
unsigned h;
const char *p;
+ if (t == NULL || t->bucketPtr == NULL) {
+ return NULL;
+ }
for (h = 0, p = key; *p;)
h = (h << 5) - h + *p++;
p = key;