Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: change return type of HashTable_Set to void
details: https://anonhg.NetBSD.org/src/rev/4217259a4ac8
branches: trunk
changeset: 1027677:4217259a4ac8
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Dec 15 10:07:53 2021 +0000
description:
make: change return type of HashTable_Set to void
None of the callers needs the HashEntry for further manipulation.
No functional change.
diffstat:
usr.bin/make/hash.c | 7 +++----
usr.bin/make/hash.h | 5 ++---
2 files changed, 5 insertions(+), 7 deletions(-)
diffs (51 lines):
diff -r a9f9d62cebf5 -r 4217259a4ac8 usr.bin/make/hash.c
--- a/usr.bin/make/hash.c Wed Dec 15 10:04:49 2021 +0000
+++ b/usr.bin/make/hash.c Wed Dec 15 10:07:53 2021 +0000
@@ -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 @@
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 -r a9f9d62cebf5 -r 4217259a4ac8 usr.bin/make/hash.h
--- a/usr.bin/make/hash.h Wed Dec 15 10:04:49 2021 +0000
+++ b/usr.bin/make/hash.h Wed Dec 15 10:07:53 2021 +0000
@@ -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 @@
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 *);
Home |
Main Index |
Thread Index |
Old Index