diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-09-07 10:54:50 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-09-07 10:54:50 +0000 |
commit | 2a65d54e7bb8b2870ec488951b2a143b57caa0a7 (patch) | |
tree | b1b926a3ab7d1bb9ce33c12700275069f0077460 /sys/netinet/ip_input.c | |
parent | 9334016033f393141355a76c6c5def775c7316d2 (diff) |
Replace a goto found in the ipq foreach loop with a simple break.
This is a common idiom when a list element has been found.
OK visa@ mpi@
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index f45b7194429..5149f7924d6 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.321 2017/09/05 00:58:16 visa Exp $ */ +/* $OpenBSD: ip_input.c,v 1.322 2017/09/07 10:54:49 bluhm Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -545,14 +545,13 @@ ip_local(struct mbuf **mp, int *offp, int nxt, int af) * Look for queue of fragments * of this datagram. */ - LIST_FOREACH(fp, &ipq, ipq_q) + LIST_FOREACH(fp, &ipq, ipq_q) { if (ip->ip_id == fp->ipq_id && ip->ip_src.s_addr == fp->ipq_src.s_addr && ip->ip_dst.s_addr == fp->ipq_dst.s_addr && ip->ip_p == fp->ipq_p) - goto found; - fp = 0; -found: + break; + } /* * Adjust ip_len to not reflect header, |