Use the nifty TAILQ_FOREACH.

This commit is contained in:
yar 2006-06-29 17:16:13 +00:00
parent cd07978e96
commit 1a7b468262

View File

@ -393,8 +393,7 @@ tuninit(struct ifnet *ifp)
ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags |= IFF_DRV_RUNNING;
getmicrotime(&ifp->if_lastchange); getmicrotime(&ifp->if_lastchange);
for (ifa = TAILQ_FIRST(&ifp->if_addrhead); ifa; TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
ifa = TAILQ_NEXT(ifa, ifa_link)) {
if (ifa->ifa_addr == NULL) if (ifa->ifa_addr == NULL)
error = EFAULT; error = EFAULT;
/* XXX: Should maybe return straight off? */ /* XXX: Should maybe return straight off? */