use TAILQ_FOREACH() in searching address list

Obtained from:	KAME
MFC after:	1 week
This commit is contained in:
ume 2001-07-03 11:54:07 +00:00
parent 8649f63ce3
commit 82ed7d29e5

View File

@ -1673,8 +1673,7 @@ ni6_addrs(ni6, m, ifpp, subj)
for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list))
{
addrsofif = 0;
for (ifa = ifp->if_addrlist.tqh_first; ifa;
ifa = ifa->ifa_list.tqe_next)
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
{
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;