Name the local variables for struct ifaddr consistently "ifa".
authorbluhm <bluhm@openbsd.org>
Wed, 8 Jan 2014 22:38:29 +0000 (22:38 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 8 Jan 2014 22:38:29 +0000 (22:38 +0000)
OK mikeb@

sys/net/pf_if.c
sys/netinet6/in6_pcb.c
sys/netinet6/raw_ip6.c

index 14e42de..6586896 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pf_if.c,v 1.69 2014/01/03 12:43:09 pelikan Exp $ */
+/*     $OpenBSD: pf_if.c,v 1.70 2014/01/08 22:38:29 bluhm Exp $ */
 
 /*
  * Copyright 2005 Henning Brauer <henning@openbsd.org>
@@ -474,16 +474,16 @@ pfi_table_update(struct pfr_ktable *kt, struct pfi_kif *kif, int net, int flags)
 void
 pfi_instance_add(struct ifnet *ifp, int net, int flags)
 {
-       struct ifaddr   *ia;
+       struct ifaddr   *ifa;
        int              got4 = 0, got6 = 0;
        int              net2, af;
 
        if (ifp == NULL)
                return;
-       TAILQ_FOREACH(ia, &ifp->if_addrlist, ifa_list) {
-               if (ia->ifa_addr == NULL)
+       TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
+               if (ifa->ifa_addr == NULL)
                        continue;
-               af = ia->ifa_addr->sa_family;
+               af = ifa->ifa_addr->sa_family;
                if (af != AF_INET && af != AF_INET6)
                        continue;
                if ((flags & PFI_AFLAG_BROADCAST) && af == AF_INET6)
@@ -496,7 +496,7 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags)
                        continue;
                if ((flags & PFI_AFLAG_NETWORK) && af == AF_INET6 &&
                    IN6_IS_ADDR_LINKLOCAL(
-                   &((struct sockaddr_in6 *)ia->ifa_addr)->sin6_addr))
+                   &((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr))
                        continue;
                if (flags & PFI_AFLAG_NOALIAS) {
                        if (af == AF_INET && got4)
@@ -512,19 +512,19 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags)
                if (net2 == 128 && (flags & PFI_AFLAG_NETWORK)) {
                        if (af == AF_INET)
                                net2 = pfi_unmask(&((struct sockaddr_in *)
-                                   ia->ifa_netmask)->sin_addr);
+                                   ifa->ifa_netmask)->sin_addr);
                        else if (af == AF_INET6)
                                net2 = pfi_unmask(&((struct sockaddr_in6 *)
-                                   ia->ifa_netmask)->sin6_addr);
+                                   ifa->ifa_netmask)->sin6_addr);
                }
                if (af == AF_INET && net2 > 32)
                        net2 = 32;
                if (flags & PFI_AFLAG_BROADCAST)
-                       pfi_address_add(ia->ifa_broadaddr, af, net2);
+                       pfi_address_add(ifa->ifa_broadaddr, af, net2);
                else if (flags & PFI_AFLAG_PEER)
-                       pfi_address_add(ia->ifa_dstaddr, af, net2);
+                       pfi_address_add(ifa->ifa_dstaddr, af, net2);
                else
-                       pfi_address_add(ia->ifa_addr, af, net2);
+                       pfi_address_add(ifa->ifa_addr, af, net2);
        }
 }
 
index 633b858..bbd3c50 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: in6_pcb.c,v 1.58 2013/12/20 02:04:09 krw Exp $        */
+/*     $OpenBSD: in6_pcb.c,v 1.59 2014/01/08 22:38:29 bluhm Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -218,7 +218,7 @@ in6_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p)
                        if (so->so_options & SO_REUSEADDR)
                                reuseport = SO_REUSEADDR | SO_REUSEPORT;
                } else if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
-                       struct ifaddr *ia = NULL;
+                       struct ifaddr *ifa = NULL;
 
                        sin6->sin6_port = 0;  /*
                                               * Yechhhh, because of upcoming
@@ -228,7 +228,7 @@ in6_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p)
                                               */
                        sin6->sin6_flowinfo = 0;
                        if (!(so->so_options & SO_BINDANY) &&
-                           (ia = ifa_ifwithaddr(sin6tosa(sin6),
+                           (ifa = ifa_ifwithaddr(sin6tosa(sin6),
                            inp->inp_rtableid)) == NULL)
                                return EADDRNOTAVAIL;
 
@@ -245,8 +245,8 @@ in6_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p)
                         * flag to control the bind(2) behavior against
                         * deprecated addresses (default: forbid bind(2)).
                         */
-                       if (ia &&
-                           ifatoia6(ia)->ia6_flags &
+                       if (ifa &&
+                           ifatoia6(ifa)->ia6_flags &
                            (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED))
                                return (EADDRNOTAVAIL);
                }
index 80f8e9a..93fe8a8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: raw_ip6.c,v 1.63 2013/12/20 02:04:09 krw Exp $        */
+/*     $OpenBSD: raw_ip6.c,v 1.64 2014/01/08 22:38:29 bluhm Exp $      */
 /*     $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $        */
 
 /*
@@ -661,7 +661,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
        case PRU_BIND:
            {
                struct sockaddr_in6 *addr = mtod(nam, struct sockaddr_in6 *);
-               struct ifaddr *ia = NULL;
+               struct ifaddr *ifa = NULL;
 
                if (nam->m_len != sizeof(*addr)) {
                        error = EINVAL;
@@ -688,12 +688,12 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
                 */
                if (!IN6_IS_ADDR_UNSPECIFIED(&addr->sin6_addr) &&
                    !(so->so_options & SO_BINDANY) &&
-                   (ia = ifa_ifwithaddr(sin6tosa(addr),
+                   (ifa = ifa_ifwithaddr(sin6tosa(addr),
                    in6p->inp_rtableid)) == 0) {
                        error = EADDRNOTAVAIL;
                        break;
                }
-               if (ia && ifatoia6(ia)->ia6_flags &
+               if (ifa && ifatoia6(ifa)->ia6_flags &
                    (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|
                     IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) {
                        error = EADDRNOTAVAIL;