summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2019-01-16 22:40:46 +0100
committerHans Dedecker <dedeckeh@gmail.com>2019-01-16 22:45:51 +0100
commit0a36768064ee2869a747446ed8b9d89121ecc1f1 (patch)
tree98abd3f2d1b1b95d9c649582084986b1432dce13 /src
parent1893905f6a9b699ae0f1813670e93bf4ec3402e9 (diff)
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 <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/dhcpv6-ia.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index c72c4b4..83de0a2 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -1114,7 +1114,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))