svn commit: r236949 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Tue Jun 12 09:18:28 UTC 2012


Author: tuexen
Date: Tue Jun 12 09:18:28 2012
New Revision: 236949
URL: http://svn.freebsd.org/changeset/base/236949

Log:
  Small cleanup.
  
  MFC after: 3 days

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Tue Jun 12 08:10:14 2012	(r236948)
+++ head/sys/netinet/sctputil.c	Tue Jun 12 09:18:28 2012	(r236949)
@@ -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);


More information about the svn-src-head mailing list