Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Use ether_lookup_multi() instead of the macro



details:   https://anonhg.NetBSD.org/src/rev/5391c440b082
branches:  trunk
changeset: 323403:5391c440b082
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Jun 14 07:54:57 2018 +0000

description:
Use ether_lookup_multi() instead of the macro

ok ozaki-r@

diffstat:

 sys/net/if_ethersubr.c |  8 ++++----
 sys/net/if_vlan.c      |  8 ++++----
 sys/netinet/ip_carp.c  |  8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diffs (108 lines):

diff -r abd0511803d5 -r 5391c440b082 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Thu Jun 14 07:44:31 2018 +0000
+++ b/sys/net/if_ethersubr.c    Thu Jun 14 07:54:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.269 2018/06/12 07:12:35 ozaki-r Exp $       */
+/*     $NetBSD: if_ethersubr.c,v 1.270 2018/06/14 07:54:57 yamaguchi Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.269 2018/06/12 07:12:35 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.270 2018/06/14 07:54:57 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1282,7 +1282,7 @@
        /*
         * See if the address range is already in the list.
         */
-       ETHER_LOOKUP_MULTI(addrlo, addrhi, ec, _enm);
+       _enm = ether_lookup_multi(addrlo, addrhi, ec);
        if (_enm != NULL) {
                /*
                 * Found it; just increment the reference count.
@@ -1334,7 +1334,7 @@
        /*
         * Look up the address in our list.
         */
-       ETHER_LOOKUP_MULTI(addrlo, addrhi, ec, enm);
+       enm = ether_lookup_multi(addrlo, addrhi, ec);
        if (enm == NULL) {
                error = ENXIO;
                goto error;
diff -r abd0511803d5 -r 5391c440b082 sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Thu Jun 14 07:44:31 2018 +0000
+++ b/sys/net/if_vlan.c Thu Jun 14 07:54:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.126 2018/06/12 04:20:36 ozaki-r Exp $    */
+/*     $NetBSD: if_vlan.c,v 1.127 2018/06/14 07:54:57 yamaguchi Exp $  */
 
 /*
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.126 2018/06/12 04:20:36 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.127 2018/06/14 07:54:57 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1176,7 +1176,7 @@
         */
        error = ether_multiaddr(sa, addrlo, addrhi);
        KASSERT(error == 0);
-       ETHER_LOOKUP_MULTI(addrlo, addrhi, &ifv->ifv_ec, mc->mc_enm);
+       mc->mc_enm = ether_lookup_multi(addrlo, addrhi, &ifv->ifv_ec);
        KASSERT(mc->mc_enm != NULL);
 
        memcpy(&mc->mc_addr, sa, sa->sa_len);
@@ -1221,7 +1221,7 @@
         */
        if ((error = ether_multiaddr(sa, addrlo, addrhi)) != 0)
                return error;
-       ETHER_LOOKUP_MULTI(addrlo, addrhi, &ifv->ifv_ec, enm);
+       enm = ether_lookup_multi(addrlo, addrhi, &ifv->ifv_ec);
 
        error = ether_delmulti(sa, &ifv->ifv_ec);
        if (error != ENETRESET)
diff -r abd0511803d5 -r 5391c440b082 sys/netinet/ip_carp.c
--- a/sys/netinet/ip_carp.c     Thu Jun 14 07:44:31 2018 +0000
+++ b/sys/netinet/ip_carp.c     Thu Jun 14 07:54:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_carp.c,v 1.96 2018/05/18 18:58:51 maxv Exp $        */
+/*     $NetBSD: ip_carp.c,v 1.97 2018/06/14 07:54:57 yamaguchi Exp $   */
 /*     $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $   */
 
 /*
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.96 2018/05/18 18:58:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.97 2018/06/14 07:54:57 yamaguchi Exp $");
 
 /*
  * TODO:
@@ -2312,7 +2312,7 @@
         * statement shouldn't fail.
         */
        (void)ether_multiaddr(sa, addrlo, addrhi);
-       ETHER_LOOKUP_MULTI(addrlo, addrhi, &sc->sc_ac, mc->mc_enm);
+       mc->mc_enm = ether_lookup_multi(addrlo, addrhi, &sc->sc_ac);
        memcpy(&mc->mc_addr, sa, sa->sa_len);
        LIST_INSERT_HEAD(&sc->carp_mc_listhead, mc, mc_entries);
 
@@ -2351,7 +2351,7 @@
         */
        if ((error = ether_multiaddr(sa, addrlo, addrhi)) != 0)
                return (error);
-       ETHER_LOOKUP_MULTI(addrlo, addrhi, &sc->sc_ac, enm);
+       enm = ether_lookup_multi(addrlo, addrhi, &sc->sc_ac);
        if (enm == NULL)
                return (EINVAL);
 



Home | Main Index | Thread Index | Old Index