Date: Fri, 17 Aug 2012 16:01:24 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239357 - in head/sys: net netipsec Message-ID: <201208171601.q7HG1Ocu091332@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Aug 17 16:01:24 2012 New Revision: 239357 URL: http://svn.freebsd.org/changeset/base/239357 Log: Unexpand a couple of TAILQ_FOREACH()s. Modified: head/sys/net/if_stf.c head/sys/netipsec/key.c Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Fri Aug 17 15:53:43 2012 (r239356) +++ head/sys/net/if_stf.c Fri Aug 17 16:01:24 2012 (r239357) @@ -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) { Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Fri Aug 17 15:53:43 2012 (r239356) +++ head/sys/netipsec/key.c Fri Aug 17 16:01:24 2012 (r239357) @@ -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 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208171601.q7HG1Ocu091332>