Reduce the number of conditional statements in nd6_prefix_onlink().
MFC after: 1 week
This commit is contained in:
parent
3ad36a25cf
commit
c26158449e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306828
@ -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? */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user