aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_pcb.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2022-05-14 10:38:43 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2023-02-01 22:56:33 +0000
commita1742f61f4b79c84eb36ab12d83e577f714551d8 (patch)
treea65db6d6f23c94909d5536382a75dad1b50fc090 /sys/netinet/sctp_pcb.c
parent33b2501870c7f508b8619850cde575d0a248d42a (diff)
sctp: use sb_avail() when accessing sb_acc for reading
This is a cleanup to simplify a patch for PR 260116. PR: 260116 (cherry picked from commit edc5b6ea881d7e196fee8df7ebcd372f8f5b4469)
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r--sys/netinet/sctp_pcb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index be41276351fe..60aa6f175366 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -3409,7 +3409,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
if ((stcb->asoc.size_on_reasm_queue > 0) ||
(stcb->asoc.control_pdapi) ||
(stcb->asoc.size_on_all_streams > 0) ||
- (so && (so->so_rcv.sb_cc > 0))) {
+ ((so != NULL) && (SCTP_SBAVAIL(&so->so_rcv) > 0))) {
/* Left with Data unread */
struct mbuf *op_err;