Reduce the number of conditional statements in nd6_prefix_onlink().

MFC after:	1 week
This commit is contained in:
Mark Johnston 2016-10-07 21:03:18 +00:00
parent 3ad36a25cf
commit c26158449e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306828

View File

@ -1734,11 +1734,11 @@ nd6_prefix_onlink(struct nd_prefix *pr)
/* XXX: freebsd does not have ifa_ifwithaf */
IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family == AF_INET6)
if (ifa->ifa_addr->sa_family == AF_INET6) {
ifa_ref(ifa);
break;
}
}
if (ifa != NULL)
ifa_ref(ifa);
IF_ADDR_RUNLOCK(ifp);
/* should we care about ia6_flags? */
}