diff options
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 00147da..9a876ee 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -314,8 +314,7 @@ ip_output(m0, opt, ro, flags, imo) if (ip->ip_src.s_addr == INADDR_ANY) { register struct in_ifaddr *ia1; - for (ia1 = TAILQ_FIRST(&in_ifaddrhead); ia1; - ia1 = TAILQ_NEXT(ia1, ia_link)) + TAILQ_FOREACH(ia1, &in_ifaddrhead, ia_link) if (ia1->ia_ifp == ifp) { ip->ip_src = IA_SIN(ia1)->sin_addr; break; @@ -581,8 +580,7 @@ sendit: * as the packet runs through ip_input() as * it is done through a ISR. */ - for (ia = TAILQ_FIRST(&in_ifaddrhead); ia; - ia = TAILQ_NEXT(ia, ia_link)) { + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { /* * If the addr to forward to is one * of ours, we pretend to |