Unexpand a couple of TAILQ_FOREACH()s.

This commit is contained in:
jhb 2012-08-17 16:01:24 +00:00
parent 5acd808491
commit 8f6ba08bcc
2 changed files with 2 additions and 6 deletions

View File

@ -618,10 +618,7 @@ stf_checkaddr4(sc, in, inifp)
* reject packets with broadcast
*/
IN_IFADDR_RLOCK();
for (ia4 = TAILQ_FIRST(&V_in_ifaddrhead);
ia4;
ia4 = TAILQ_NEXT(ia4, ia_link))
{
TAILQ_FOREACH(ia4, &V_in_ifaddrhead, ia_link) {
if ((ia4->ia_ifa.ifa_ifp->if_flags & IFF_BROADCAST) == 0)
continue;
if (in->s_addr == ia4->ia_broadaddr.sin_addr.s_addr) {

View File

@ -3921,8 +3921,7 @@ key_ismyaddr(sa)
case AF_INET:
sin = (struct sockaddr_in *)sa;
IN_IFADDR_RLOCK();
for (ia = V_in_ifaddrhead.tqh_first; ia;
ia = ia->ia_link.tqe_next)
TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link)
{
if (sin->sin_family == ia->ia_addr.sin_family &&
sin->sin_len == ia->ia_addr.sin_len &&