git: 34ae6a1a4428 - main - sctp: cleanup, on functional change intended.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Dec 2021 17:29:28 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=34ae6a1a442881681a9c63e93a189b9191db50ed commit 34ae6a1a442881681a9c63e93a189b9191db50ed Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2021-12-27 17:28:44 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2021-12-27 17:28:44 +0000 sctp: cleanup, on functional change intended. MFC after: 3 days --- sys/netinet/sctputil.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 8322603438c3..6c58ad47f274 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -2895,13 +2895,12 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint32_t sctp_calculate_len(struct mbuf *m) { - uint32_t tlen = 0; struct mbuf *at; + uint32_t tlen; - at = m; - while (at) { + tlen = 0; + for (at = m; at != NULL; at = SCTP_BUF_NEXT(at)) { tlen += SCTP_BUF_LEN(at); - at = SCTP_BUF_NEXT(at); } return (tlen); }