#ifndef lint
static char copyright[] =
-"$Id: mdb.c,v 1.39 2000/07/06 22:40:27 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: mdb.c,v 1.40 2000/07/09 07:00:06 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
} else {
/* If there isn't already a host decl matching this
address, add it to the hash table. */
- if (!host_hash_lookup (&hp, host_hw_addr_hash,
- hd -> interface.hbuf,
- hd -> interface.hlen, MDL)) {
- host_hash_add (host_hw_addr_hash,
- hd -> interface.hbuf,
- hd -> interface.hlen,
- hd, MDL);
- }
+ host_hash_lookup (&hp, host_hw_addr_hash,
+ hd -> interface.hbuf,
+ hd -> interface.hlen, MDL);
+ }
+ if (!hp)
+ host_hash_add (host_hw_addr_hash, hd -> interface.hbuf,
+ hd -> interface.hlen, hd, MDL);
+ else {
+ /* If there was already a host declaration for
+ this hardware address, add this one to the
+ end of the list. */
+ for (np = hp; np -> n_ipaddr; np = np -> n_ipaddr)
+ ;
+ host_reference (&np -> n_ipaddr, hd, MDL);
+ host_dereference (&hp, MDL);
}
- }
-
- /* If there was already a host declaration for this hardware
- address, add this one to the end of the list. */
-
- if (hp) {
- for (np = hp; np -> n_ipaddr; np = np -> n_ipaddr)
- ;
- host_reference (&np -> n_ipaddr, hd, MDL);
- host_dereference (&hp, MDL);
}
/* See if there's a statement that sets the client identifier.