Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Stop using useless IN6_*_MULTI macros
details: https://anonhg.NetBSD.org/src/rev/7a4967fcf23e
branches: trunk
changeset: 351676:7a4967fcf23e
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Feb 22 07:46:00 2017 +0000
description:
Stop using useless IN6_*_MULTI macros
diffstat:
sys/netinet6/in6_var.h | 25 +------------------------
sys/netinet6/ip6_input.c | 6 +++---
sys/netinet6/ip6_mroute.c | 6 +++---
sys/netinet6/ip6_output.c | 6 +++---
sys/netinet6/mld6.c | 8 ++++----
sys/netinet6/nd6.c | 6 +++---
sys/netipsec/key.c | 6 +++---
7 files changed, 20 insertions(+), 43 deletions(-)
diffs (217 lines):
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netinet6/in6_var.h Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_var.h,v 1.91 2017/01/16 15:44:47 christos Exp $ */
+/* $NetBSD: in6_var.h,v 1.92 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -680,14 +680,6 @@
return in6m;
}
-#define IN6_LOOKUP_MULTI(__addr, __ifp, __in6m) \
-/* struct in6_addr __addr; */ \
-/* struct ifnet *__ifp; */ \
-/* struct in6_multi *__in6m; */ \
-do { \
- (__in6m) = in6_lookup_multi(&(__addr), (__ifp)); \
-} while (/*CONSTCOND*/ 0)
-
/*
* Macro to step through all of the in6_multi records, one at a time.
* The current position is remembered in "step", which the caller must
@@ -726,21 +718,6 @@
return in6_next_multi(step);
}
-#define IN6_NEXT_MULTI(__step, __in6m) \
-/* struct in6_multistep __step; */ \
-/* struct in6_multi *__in6m; */ \
-do { \
- (__in6m) = in6_next_multi(&(__step)); \
-} while (/*CONSTCOND*/ 0)
-
-#define IN6_FIRST_MULTI(__step, __in6m) \
-/* struct in6_multistep __step; */ \
-/* struct in6_multi *__in6m */ \
-do { \
- (__in6m) = in6_first_multi(&(__step)); \
-} while (/*CONSTCOND*/ 0)
-
-
#if 0
/*
* Macros for looking up the in6_multi_mship record for a given IP6 multicast
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netinet6/ip6_input.c Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_input.c,v 1.174 2017/02/21 03:59:31 ozaki-r Exp $ */
+/* $NetBSD: ip6_input.c,v 1.175 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.174 2017/02/21 03:59:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.175 2017/02/22 07:46:00 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_gateway.h"
@@ -465,7 +465,7 @@
* See if we belong to the destination multicast group on the
* arrival interface.
*/
- IN6_LOOKUP_MULTI(ip6->ip6_dst, rcvif, in6m);
+ in6m = in6_lookup_multi(&ip6->ip6_dst, rcvif);
if (in6m)
ours = 1;
else if (!ip6_mrouter) {
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netinet6/ip6_mroute.c Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_mroute.c,v 1.117 2017/02/14 03:05:06 ozaki-r Exp $ */
+/* $NetBSD: ip6_mroute.c,v 1.118 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */
/*
@@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.117 2017/02/14 03:05:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.118 2017/02/22 07:46:00 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1608,7 +1608,7 @@
*/
sockaddr_in6_init(&dst6, &ip6->ip6_dst, 0, 0, 0);
- IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m);
+ in6m = in6_lookup_multi(&ip6->ip6_dst, ifp);
if (in6m != NULL) {
ip6_mloopback(ifp, m,
satocsin6(rtcache_getdst(&ro)));
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netinet6/ip6_output.c Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_output.c,v 1.185 2017/02/22 07:05:04 ozaki-r Exp $ */
+/* $NetBSD: ip6_output.c,v 1.186 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.185 2017/02/22 07:05:04 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.186 2017/02/22 07:46:00 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -652,7 +652,7 @@
goto bad;
}
- IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m);
+ in6m = in6_lookup_multi(&ip6->ip6_dst, ifp);
if (in6m != NULL &&
(im6o == NULL || im6o->im6o_multicast_loop)) {
/*
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netinet6/mld6.c
--- a/sys/netinet6/mld6.c Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netinet6/mld6.c Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mld6.c,v 1.81 2017/02/07 02:38:08 ozaki-r Exp $ */
+/* $NetBSD: mld6.c,v 1.82 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $KAME: mld6.c,v 1.25 2001/01/16 14:14:18 itojun Exp $ */
/*
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.81 2017/02/07 02:38:08 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.82 2017/02/22 07:46:00 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -493,7 +493,7 @@
* If we belong to the group being reported, stop
* our timer for that group.
*/
- IN6_LOOKUP_MULTI(mld_addr, ifp, in6m);
+ in6m = in6_lookup_multi(&mld_addr, ifp);
if (in6m) {
mld_stoptimer(in6m); /* transit to idle state */
in6m->in6m_state = MLD_OTHERLISTENER; /* clear flag */
@@ -665,7 +665,7 @@
/*
* See if address already in list.
*/
- IN6_LOOKUP_MULTI(*maddr6, ifp, in6m);
+ in6m = in6_lookup_multi(maddr6, ifp);
if (in6m != NULL) {
/*
* Found it; just increment the refrence count.
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netinet6/nd6.c Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.229 2017/02/22 03:41:54 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.230 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.229 2017/02/22 03:41:54 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.230 2017/02/22 07:46:00 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1621,7 +1621,7 @@
llsol.s6_addr32[2] = htonl(1);
llsol.s6_addr8[12] = 0xff;
if (in6_setscope(&llsol, ifp, NULL) == 0) {
- IN6_LOOKUP_MULTI(llsol, ifp, in6m);
+ in6m = in6_lookup_multi(&llsol, ifp);
if (in6m)
in6_delmulti(in6m);
}
diff -r 2ae0ef594f18 -r 7a4967fcf23e sys/netipsec/key.c
--- a/sys/netipsec/key.c Wed Feb 22 07:05:47 2017 +0000
+++ b/sys/netipsec/key.c Wed Feb 22 07:46:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.101 2016/07/20 07:37:51 ozaki-r Exp $ */
+/* $NetBSD: key.c,v 1.102 2017/02/22 07:46:00 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.101 2016/07/20 07:37:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.102 2017/02/22 07:46:00 ozaki-r Exp $");
/*
* This code is referd to RFC 2367
@@ -4182,7 +4182,7 @@
*/
in6m = NULL;
#ifdef __FreeBSD__
- IN6_LOOKUP_MULTI(sin6->sin6_addr, ia->ia_ifp, in6m);
+ in6m = in6_lookup_multi(&sin6->sin6_addr, ia->ia_ifp);
#else
for ((in6m) = ia->ia6_multiaddrs.lh_first;
(in6m) != NULL &&
Home |
Main Index |
Thread Index |
Old Index