From: Mark Andrews Date: Mon, 23 Nov 2009 21:19:25 +0000 (+0000) Subject: chaddr was not being set on all paths leading to a compiler warning X-Git-Tag: v4_2_0a1~6^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fed0952fbb0f1252df0bba6c3fbef707f1f982b7;p=thirdparty%2Fdhcp.git chaddr was not being set on all paths leading to a compiler warning --- diff --git a/server/dhcpv6.c b/server/dhcpv6.c index 6cca58be1..ffa339de6 100644 --- a/server/dhcpv6.c +++ b/server/dhcpv6.c @@ -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; }