diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2024-10-24 11:24:49 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2024-10-24 11:24:49 +0000 |
commit | e4ac0183a1a846ef6556c9876dab76c06f5fea9c (patch) | |
tree | bf2e14f02338dfaba9f5c968c4d95d79335d6597 | |
parent | ce20b48a60fbae275085237dd48075d426f00d37 (diff) | |
download | src-e4ac0183a1a8.tar.gz src-e4ac0183a1a8.zip |
sctp: cleanup
No functional change intended.
MFC after: 3 days
-rw-r--r-- | sys/netinet/sctp_pcb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 92f08717c001..f25668b5756c 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -192,21 +192,17 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index) struct sctp_ifn *sctp_ifnp; struct sctp_ifnlist *hash_ifn_head; - /* - * We assume the lock is held for the addresses if that's wrong - * problems could occur :-) - */ SCTP_IPI_ADDR_LOCK_ASSERT(); hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) { if (sctp_ifnp->ifn_index == ifn_index) { - return (sctp_ifnp); + break; } - if (sctp_ifnp->ifn_p && ifn && (sctp_ifnp->ifn_p == ifn)) { - return (sctp_ifnp); + if (ifn != NULL && sctp_ifnp->ifn_p == ifn) { + break; } } - return (NULL); + return (sctp_ifnp); } struct sctp_vrf * |