summaryrefslogtreecommitdiff
path: root/usr.bin/xlint/lint2/hash.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2005-11-20 17:09:56 +0000
committerChad Loder <cloder@cvs.openbsd.org>2005-11-20 17:09:56 +0000
commit2d3ff7614dff2c02b923d828ca4d6f0e6141bd1a (patch)
tree7f08c0b3768b030051e347112629cadf41b8b630 /usr.bin/xlint/lint2/hash.c
parent0207ac41b2a68ff8abee36cf33e91697288a0533 (diff)
KNF. OK kjell, millert
Diffstat (limited to 'usr.bin/xlint/lint2/hash.c')
-rw-r--r--usr.bin/xlint/lint2/hash.c16
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;