From: Hans Dedecker Date: Wed, 16 Jan 2019 21:40:46 +0000 (+0100) Subject: dhcpv6-ia: fix compiler warning X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ae16950ce18b037a91b706edcee92ce173cf74b0;p=project%2Fodhcpd.git dhcpv6-ia: fix compiler warning Fixes : src/dhcpv6-ia.c:1117:22: warning: variable 'onlink' set but not used [-Wunused-but-set-variable] for (size_t i = 0, onlink = false; i < addrlen; ++i) { Signed-off-by: Hans Dedecker --- diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index de7e673..0df058b 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -1112,7 +1112,8 @@ static bool dhcpv6_ia_on_link(const struct dhcpv6_ia_hdr *ia, struct dhcpv6_assi (otype != DHCPV6_OPT_IA_ADDR || olen < sizeof(*n) - 4)) continue; - for (size_t i = 0, onlink = false; i < addrlen; ++i) { + onlink = false; + for (size_t i = 0; i < addrlen; ++i) { struct in6_addr addr = addrs[i].addr.in6; if (!valid_addr(&addrs[i], now))