Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Use IFADDR_FOREACH for iterating if_addrlist of ifnet
details: https://anonhg.NetBSD.org/src/rev/eb5a407a3b27
branches: trunk
changeset: 330899:eb5a407a3b27
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Jul 25 07:12:55 2014 +0000
description:
Use IFADDR_FOREACH for iterating if_addrlist of ifnet
diffstat:
sys/arch/x86/x86/vmt.c | 4 ++--
sys/netinet6/mld6.c | 8 ++++----
sys/netinet6/nd6_rtr.c | 9 ++++-----
3 files changed, 10 insertions(+), 11 deletions(-)
diffs (91 lines):
diff -r efcb1b8d5b6c -r eb5a407a3b27 sys/arch/x86/x86/vmt.c
--- a/sys/arch/x86/x86/vmt.c Fri Jul 25 07:07:47 2014 +0000
+++ b/sys/arch/x86/x86/vmt.c Fri Jul 25 07:12:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmt.c,v 1.9 2014/05/17 20:44:24 rmind Exp $ */
+/* $NetBSD: vmt.c,v 1.10 2014/07/25 07:12:55 ozaki-r Exp $ */
/* $OpenBSD: vmt.c,v 1.11 2011/01/27 21:29:25 dtucker Exp $ */
/*
@@ -815,7 +815,7 @@
continue;
}
- TAILQ_FOREACH(iface_addr, &iface->if_addrlist, ifa_list) {
+ IFADDR_FOREACH(iface_addr, iface) {
if (iface_addr->ifa_addr->sa_family != AF_INET) {
continue;
}
diff -r efcb1b8d5b6c -r eb5a407a3b27 sys/netinet6/mld6.c
--- a/sys/netinet6/mld6.c Fri Jul 25 07:07:47 2014 +0000
+++ b/sys/netinet6/mld6.c Fri Jul 25 07:12:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mld6.c,v 1.57 2014/06/10 09:38:30 joerg Exp $ */
+/* $NetBSD: mld6.c,v 1.58 2014/07/25 07:12:55 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.57 2014/06/10 09:38:30 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.58 2014/07/25 07:12:55 ozaki-r Exp $");
#include "opt_inet.h"
@@ -972,7 +972,7 @@
if (oldp == NULL) {
*oldlenp = 0;
- TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
+ IFADDR_FOREACH(ifa, ifp) {
if (ifa->ifa_addr == NULL)
continue;
if (ifa->ifa_addr->sa_family != AF_INET6)
@@ -988,7 +988,7 @@
error = 0;
written = 0;
- TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
+ IFADDR_FOREACH(ifa, ifp) {
if (ifa->ifa_addr == NULL)
continue;
if (ifa->ifa_addr->sa_family != AF_INET6)
diff -r efcb1b8d5b6c -r eb5a407a3b27 sys/netinet6/nd6_rtr.c
--- a/sys/netinet6/nd6_rtr.c Fri Jul 25 07:07:47 2014 +0000
+++ b/sys/netinet6/nd6_rtr.c Fri Jul 25 07:12:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6_rtr.c,v 1.91 2014/05/17 21:26:20 rmind Exp $ */
+/* $NetBSD: nd6_rtr.c,v 1.92 2014/07/25 07:12:55 ozaki-r Exp $ */
/* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.91 2014/05/17 21:26:20 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.92 2014/07/25 07:12:55 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -897,7 +897,7 @@
{
struct nd_prefix *pr, *pr_next;
struct in6_ifaddr *ia;
- struct ifaddr *ifa, *ifa_next;
+ struct ifaddr *ifa;
for (pr = nd_prefix.lh_first; pr; pr = pr_next) {
pr_next = pr->ndpr_next;
@@ -915,8 +915,7 @@
!LIST_EMPTY(&pr->ndpr_advrtrs)))
continue;
- for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = ifa_next) {
- ifa_next = ifa->ifa_list.tqe_next;
+ IFADDR_FOREACH(ifa, ifp) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
ia = (struct in6_ifaddr *)ifa;
Home |
Main Index |
Thread Index |
Old Index