]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
chaddr was not being set on all paths leading to a compiler warning
authorMark Andrews <marka@isc.org>
Tue, 24 Nov 2009 01:37:23 +0000 (01:37 +0000)
committerMark Andrews <marka@isc.org>
Tue, 24 Nov 2009 01:37:23 +0000 (01:37 +0000)
server/dhcpv6.c

index 96a95e5bd6c0ae1050ae1bb572abf6c81b7d6e60..6ad7681e9c8ef1e08a1268b29019d43002be7112 100644 (file)
@@ -5957,6 +5957,7 @@ find_hosts_by_duid_chaddr(struct host_decl **host,
         */
        htype = getUShort(client_id->data + 2);
        hlen = 0;
+       chaddr = NULL;
 
        /* The first two octets of the DUID identify the type. */
        switch(getUShort(client_id->data)) {
@@ -5977,8 +5978,6 @@ find_hosts_by_duid_chaddr(struct host_decl **host,
                break;
 
              default:
-               /* Silence compiler warnings. */
-               chaddr = NULL;
                break;
        }