summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-05-10 15:30:47 +0000
committerderaadt <deraadt@openbsd.org>2004-05-10 15:30:47 +0000
commita3ca4452088fceeee89c3b311b780cc3c38e5838 (patch)
tree3d860a738454e6278c38a09bb1d974f2657639cc
parentremove iso crud, and other misc cleanups; millert ok (diff)
downloadwireguard-openbsd-a3ca4452088fceeee89c3b311b780cc3c38e5838.tar.xz
wireguard-openbsd-a3ca4452088fceeee89c3b311b780cc3c38e5838.zip
knf
-rw-r--r--sbin/dhclient/hash.c10
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);