Module Name: src
Committed By: rillig
Date: Sat Oct 3 22:33:26 UTC 2020
Modified Files:
src/usr.bin/make: hash.c
Log Message:
make(1): remove unnecessary code from Hash_DeleteEntry
This function is only called 2 times, and both callers pass valid
arguments.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/make/hash.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/hash.c
diff -u src/usr.bin/make/hash.c:1.36 src/usr.bin/make/hash.c:1.37
--- src/usr.bin/make/hash.c:1.36 Sat Oct 3 22:25:04 2020
+++ src/usr.bin/make/hash.c Sat Oct 3 22:33:26 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.36 2020/10/03 22:25:04 rillig Exp $ */
+/* $NetBSD: hash.c,v 1.37 2020/10/03 22:33:26 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -79,7 +79,7 @@
#include "make.h"
/* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: hash.c,v 1.36 2020/10/03 22:25:04 rillig Exp $");
+MAKE_RCSID("$NetBSD: hash.c,v 1.37 2020/10/03 22:33:26 rillig Exp $");
/*
* Forward references to local procedures that are used before they're
@@ -257,8 +257,6 @@ Hash_DeleteEntry(Hash_Table *t, Hash_Ent
{
Hash_Entry **hp, *p;
- if (e == NULL)
- return;
for (hp = &t->buckets[e->namehash & t->bucketsMask];
(p = *hp) != NULL; hp = &p->next) {
if (p == e) {
@@ -268,7 +266,6 @@ Hash_DeleteEntry(Hash_Table *t, Hash_Ent
return;
}
}
- (void)write(2, "bad call to Hash_DeleteEntry\n", 29);
abort();
}