diff options
Diffstat (limited to 'usr.bin/xlint/lint2/hash.c')
-rw-r--r-- | usr.bin/xlint/lint2/hash.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/usr.bin/xlint/lint2/hash.c b/usr.bin/xlint/lint2/hash.c index 35c7c540398..1e86c03977e 100644 --- a/usr.bin/xlint/lint2/hash.c +++ b/usr.bin/xlint/lint2/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.4 2002/02/16 21:27:59 millert Exp $ */ +/* $OpenBSD: hash.c,v 1.5 2005/11/20 17:09:55 cloder Exp $ */ /* $NetBSD: hash.c,v 1.2 1995/07/03 21:24:47 cgd Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: hash.c,v 1.4 2002/02/16 21:27:59 millert Exp $"; +static char rcsid[] = "$OpenBSD: hash.c,v 1.5 2005/11/20 17:09:55 cloder Exp $"; #endif #include <stddef.h> @@ -51,7 +51,7 @@ static int hash(const char *); * Initialize hash table. */ void -inithash() +inithash(void) { htab = xcalloc(HSHSIZ2, sizeof (hte_t *)); } @@ -60,8 +60,7 @@ inithash() * Compute hash value from a string. */ static int -hash(s) - const char *s; +hash(const char *s) { u_int v; const u_char *us; @@ -79,9 +78,7 @@ hash(s) * given name exists and mknew is set, create a new one. */ hte_t * -hsearch(s, mknew) - const char *s; - int mknew; +hsearch(const char *s, int mknew) { int h; hte_t *hte; @@ -112,8 +109,7 @@ hsearch(s, mknew) * Call function f for each name in the hash table. */ void -forall(f) - void (*f)(hte_t *); +forall(void (*f)(hte_t *)) { int i; hte_t *hte; |