From ca3116d2f11afe61b409525ab33d8cf0139a1078 Mon Sep 17 00:00:00 2001 From: drochner Date: Tue, 11 Nov 2003 21:41:11 +0000 Subject: [PATCH] in_ifaddr -> in_ifaddrhead use TAILQ_FOREACH macro --- sys/netkey/key.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netkey/key.c b/sys/netkey/key.c index 854c6d3ecbe8..207499a3f07c 100644 --- a/sys/netkey/key.c +++ b/sys/netkey/key.c @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.105 2003/11/10 10:52:13 itojun Exp $ */ +/* $NetBSD: key.c,v 1.106 2003/11/11 21:41:11 drochner Exp $ */ /* $KAME: key.c,v 1.310 2003/09/08 02:23:44 itojun Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.105 2003/11/10 10:52:13 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.106 2003/11/11 21:41:11 drochner Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -3878,8 +3878,7 @@ key_ismyaddr(sa) #ifdef INET case AF_INET: sin = (struct sockaddr_in *)sa; - for (ia = in_ifaddr.tqh_first; ia; ia = ia->ia_list.tqe_next) - { + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_list) { if (sin->sin_family == ia->ia_addr.sin_family && sin->sin_len == ia->ia_addr.sin_len && sin->sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr)