summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2002-06-12 03:08:08 +0000
committerhsu <hsu@FreeBSD.org>2002-06-12 03:08:08 +0000
commitab949ac863c2422987fe56ef2d0b5084e8a3810d (patch)
treeb3ff6db10a550ee3a128c6c49a97db809887f041
parent052b70fe671743d5604e1dd3471927243c9a7bdb (diff)
downloadFreeBSD-src-ab949ac863c2422987fe56ef2d0b5084e8a3810d.zip
FreeBSD-src-ab949ac863c2422987fe56ef2d0b5084e8a3810d.tar.gz
Fix typo where INP_INFO_RLOCK should be INP_INFO_RUNLOCK.
Submitted by: tegge, jlemon Prefer LIST_FOREACH macro. Submitted by: jlemon
-rw-r--r--sys/netinet/in_pcb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index f45be67..2c539b3 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -704,15 +704,13 @@ in_pcbpurgeif0(pcbinfo, ifp)
struct inpcbinfo *pcbinfo;
struct ifnet *ifp;
{
- struct inpcb *head;
struct inpcb *inp;
struct ip_moptions *imo;
int i, gap;
/* why no splnet here? XXX */
INP_INFO_RLOCK(pcbinfo);
- head = LIST_FIRST(pcbinfo->listhead);
- for (inp = head; inp != NULL; inp = LIST_NEXT(inp, inp_list)) {
+ LIST_FOREACH(inp, pcbinfo->listhead, inp_list) {
INP_LOCK(inp);
imo = inp->inp_moptions;
if ((inp->inp_vflag & INP_IPV4) &&
@@ -741,7 +739,7 @@ in_pcbpurgeif0(pcbinfo, ifp)
}
INP_UNLOCK(inp);
}
- INP_INFO_RLOCK(pcbinfo);
+ INP_INFO_RUNLOCK(pcbinfo);
}
/*
OpenPOWER on IntegriCloud