summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-10-18 21:27:28 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-10-18 21:27:28 +0000
commite2ecfce56bf0bee9810cb090fcc210339ab0bd04 (patch)
tree8f58e7fb90ae93fbfaa9de207b177e3df41ca984 /sys/netinet/in_pcb.c
parentf1d1f1bfe351027dd627993bd5d34f9711e79f24 (diff)
In in_pcblookup() convert a hand crafted loop into a LIST_FOREACH
macro. No binary change. OK mpi@
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index e54e436f7af..02330f5718c 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.141 2013/10/17 16:27:43 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.142 2013/10/18 21:27:27 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -658,8 +658,7 @@ in_pcblookup(struct inpcbtable *table, void *faddrp, u_int fport_arg,
struct in_addr laddr = *(struct in_addr *)laddrp;
rdomain = rtable_l2(rdomain); /* convert passed rtableid to rdomain */
- for (inp = LIST_FIRST(INPCBLHASH(table, lport, rdomain)); inp;
- inp = LIST_NEXT(inp, inp_lhash)) {
+ LIST_FOREACH(inp, INPCBLHASH(table, lport, rdomain), inp_lhash) {
if (rtable_l2(inp->inp_rtableid) != rdomain)
continue;
if (inp->inp_lport != lport)