Module Name: src Committed By: rillig Date: Wed Dec 15 10:07:53 UTC 2021
Modified Files: src/usr.bin/make: hash.c hash.h Log Message: make: change return type of HashTable_Set to void None of the callers needs the HashEntry for further manipulation. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/usr.bin/make/hash.c cvs rdiff -u -r1.42 -r1.43 src/usr.bin/make/hash.h 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.66 src/usr.bin/make/hash.c:1.67 --- src/usr.bin/make/hash.c:1.66 Tue Dec 7 21:58:01 2021 +++ src/usr.bin/make/hash.c Wed Dec 15 10:07:53 2021 @@ -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, cons 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. */ Index: src/usr.bin/make/hash.h diff -u src/usr.bin/make/hash.h:1.42 src/usr.bin/make/hash.h:1.43 --- src/usr.bin/make/hash.h:1.42 Wed Dec 15 09:53:41 2021 +++ src/usr.bin/make/hash.h Wed Dec 15 10:07:53 2021 @@ -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) M 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 *);