Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Use IFADDR_FOREACH instead of IFADDR_FOREACH_SAFE
details: https://anonhg.NetBSD.org/src/rev/be29f3582a74
branches: trunk
changeset: 346321:be29f3582a74
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Jul 07 06:54:26 2016 +0000
description:
Use IFADDR_FOREACH instead of IFADDR_FOREACH_SAFE
No item is removed in the loop.
diffstat:
sys/netinet/sctp_asconf.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r f9d93fac55c4 -r be29f3582a74 sys/netinet/sctp_asconf.c
--- a/sys/netinet/sctp_asconf.c Thu Jul 07 06:28:57 2016 +0000
+++ b/sys/netinet/sctp_asconf.c Thu Jul 07 06:54:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sctp_asconf.c,v 1.3 2016/05/12 02:24:17 ozaki-r Exp $ */
+/* $NetBSD: sctp_asconf.c,v 1.4 2016/07/07 06:54:26 ozaki-r Exp $ */
/* $KAME: sctp_asconf.c,v 1.25 2005/06/16 20:44:24 jinmei Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.3 2016/05/12 02:24:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.4 2016/07/07 06:54:26 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -2114,7 +2114,7 @@
sctp_find_valid_localaddr(struct sctp_tcb *stcb)
{
struct ifnet *ifn;
- struct ifaddr *ifa, *nifa;
+ struct ifaddr *ifa;
int s;
s = pserialize_read_enter();
@@ -2123,7 +2123,7 @@
/* Skip if loopback_scope not set */
continue;
}
- IFADDR_FOREACH_SAFE(ifa, ifn, nifa) {
+ IFADDR_FOREACH(ifa, ifn) {
if (ifa->ifa_addr->sa_family == AF_INET &&
stcb->asoc.ipv4_addr_legal) {
struct sockaddr_in *sin;
Home |
Main Index |
Thread Index |
Old Index