Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2012 08:27:03 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r237908 - stable/9/sys/netinet
Message-ID:  <201207010827.q618R3P9077284@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Jul  1 08:27:02 2012
New Revision: 237908
URL: http://svn.freebsd.org/changeset/base/237908

Log:
  MFC r236949:
  Small cleanup.

Modified:
  stable/9/sys/netinet/sctputil.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/sctputil.c
==============================================================================
--- stable/9/sys/netinet/sctputil.c	Sun Jul  1 08:23:16 2012	(r237907)
+++ stable/9/sys/netinet/sctputil.c	Sun Jul  1 08:27:02 2012	(r237908)
@@ -2573,15 +2573,13 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa
 	/* find the last mbuf in chain and pad it */
 	struct mbuf *m_at;
 
-	m_at = m;
 	if (last_mbuf) {
 		return (sctp_add_pad_tombuf(last_mbuf, padval));
 	} else {
-		while (m_at) {
+		for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) {
 			if (SCTP_BUF_NEXT(m_at) == NULL) {
 				return (sctp_add_pad_tombuf(m_at, padval));
 			}
-			m_at = SCTP_BUF_NEXT(m_at);
 		}
 	}
 	SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EFAULT);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207010827.q618R3P9077284>