From: Roy Marples Date: Sat, 18 May 2013 15:37:27 +0000 (+0000) Subject: Use macros instead of memcmp X-Git-Tag: v5.99.7~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5b9d6028161a580674241e82db0d5a99a69276d;p=thirdparty%2Fdhcpcd.git Use macros instead of memcmp --- diff --git a/ipv6.c b/ipv6.c index 56458336..9fb159ea 100644 --- a/ipv6.c +++ b/ipv6.c @@ -319,10 +319,8 @@ ipv6_handleifa(int cmd, struct if_head *ifs, const char *ifname, if (state == NULL) return; TAILQ_FOREACH(ap, &state->ll_addrs, next) { - if (memcmp(ap->addr.s6_addr, - addr->s6_addr, - sizeof(ap->addr.s6_addr)) == 0) - break; + if (IN6_ARE_ADDR_EQUAL(&ap->addr, addr)) + break; } switch (cmd) { case RTM_DELADDR: @@ -423,9 +421,7 @@ ipv6_handleifa_addrs(int cmd, alldadcompleted = 1; found = 0; TAILQ_FOREACH_SAFE(ap, addrs, next, apn) { - if (memcmp(addr->s6_addr, ap->addr.s6_addr, - sizeof(addr->s6_addr))) - { + if (!IN6_ARE_ADDR_EQUAL(addr, &ap->addr)) { if (ap->dadcompleted == 0) alldadcompleted = 0; continue;