]> 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>
Mon, 23 Nov 2009 21:19:25 +0000 (21:19 +0000)
committerMark Andrews <marka@isc.org>
Mon, 23 Nov 2009 21:19:25 +0000 (21:19 +0000)
server/dhcpv6.c

index 6cca58be18142b08e616319540bf6888ac3727ea..ffa339de6c7aabcd9670ef718daacd1e6a9a653a 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;
        }