summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-12-15 10:07:53 +0000
committerrillig <rillig@NetBSD.org>2021-12-15 10:07:53 +0000
commit67ff605eadff67d5b9ddbb7f306dde02e2633a11 (patch)
tree6ae083c29fc2b910dff99b9daf8bb14ca737931a /usr.bin/make
parent8b662f7da83b5b418547225edc35e05ee693f003 (diff)
make: change return type of HashTable_Set to void
None of the callers needs the HashEntry for further manipulation. No functional change.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/hash.c7
-rw-r--r--usr.bin/make/hash.h5
2 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/make/hash.c b/usr.bin/make/hash.c
index ec0079fa4ba..0b8ab66272c 100644
--- a/usr.bin/make/hash.c
+++ b/usr.bin/make/hash.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.66 2021/12/07 21:58:01 rillig Exp $ */
+/* $NetBSD: hash.c,v 1.67 2021/12/15 10:07:53 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
#include "make.h"
/* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: hash.c,v 1.66 2021/12/07 21:58:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: hash.c,v 1.67 2021/12/15 10:07:53 rillig Exp $");
/*
* The ratio of # entries to # buckets at which we rebuild the table to
@@ -307,12 +307,11 @@ HashTable_CreateEntry(HashTable *t, const char *key, bool *out_isNew)
return he;
}
-HashEntry *
+void
HashTable_Set(HashTable *t, const char *key, void *value)
{
HashEntry *he = HashTable_CreateEntry(t, key, NULL);
HashEntry_Set(he, value);
- return he;
}
/* Delete the entry from the table and free the associated memory. */
diff --git a/usr.bin/make/hash.h b/usr.bin/make/hash.h
index 95c5c6f9c7a..87a10b5ec8b 100644
--- a/usr.bin/make/hash.h
+++ b/usr.bin/make/hash.h
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.h,v 1.42 2021/12/15 09:53:41 rillig Exp $ */
+/* $NetBSD: hash.h,v 1.43 2021/12/15 10:07:53 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -137,8 +137,7 @@ unsigned int Hash_Substring(Substring) MAKE_ATTR_USE;
void *HashTable_FindValueBySubstringHash(HashTable *, Substring, unsigned int)
MAKE_ATTR_USE;
HashEntry *HashTable_CreateEntry(HashTable *, const char *, bool *);
-/* TODO: change return type to void */
-HashEntry *HashTable_Set(HashTable *, const char *, void *);
+void HashTable_Set(HashTable *, const char *, void *);
void HashTable_DeleteEntry(HashTable *, HashEntry *);
void HashTable_DebugStats(HashTable *, const char *);