diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-05-10 15:30:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-05-10 15:30:48 +0000 |
commit | c8c89a559d122eef184d11933a4181c9b0ca1c04 (patch) | |
tree | cc558d99aaa7d398b528030691a11fd49e4732f5 /sbin/dhclient | |
parent | a521bc1b35e6e1da39d58505e3b16398386993e7 (diff) |
knf
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/hash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/dhclient/hash.c b/sbin/dhclient/hash.c index e570c73db31..4f1795b2435 100644 --- a/sbin/dhclient/hash.c +++ b/sbin/dhclient/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.8 2004/05/04 22:23:01 mickey Exp $ */ +/* $OpenBSD: hash.c,v 1.9 2004/05/10 15:30:47 deraadt Exp $ */ /* Routines for manipulating hash tables... */ @@ -48,6 +48,7 @@ struct hash_table * new_hash(void) { struct hash_table *rv = new_hash_table(DEFAULT_HASH_SIZE); + if (!rv) return (rv); memset(&rv->buckets[0], 0, @@ -58,9 +59,8 @@ new_hash(void) static int do_hash(unsigned char *name, int len, int size) { - int accum = 0; unsigned char *s = name; - int i = len; + int accum = 0, i = len; while (i--) { /* Add the character in... */ @@ -75,8 +75,8 @@ do_hash(unsigned char *name, int len, int size) void add_hash(struct hash_table *table, unsigned char *name, int len, unsigned char *pointer) { - int hashno; struct hash_bucket *bp; + int hashno; if (!table) return; @@ -100,8 +100,8 @@ void add_hash(struct hash_table *table, unsigned char *name, int len, unsigned char * hash_lookup(struct hash_table *table, unsigned char *name, int len) { - int hashno; struct hash_bucket *bp; + int hashno; if (!table) return (NULL); |