Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2012 14:18:13 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236563 - head/sys/kern
Message-ID:  <201206041418.q54EIDU3046078@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Jun  4 14:18:13 2012
New Revision: 236563
URL: http://svn.freebsd.org/changeset/base/236563

Log:
  Microoptimisation of code from r236560, also coming from Nginx Inc.
  
  Submitted by:	ru

Modified:
  head/sys/kern/uipc_syscalls.c

Modified: head/sys/kern/uipc_syscalls.c
==============================================================================
--- head/sys/kern/uipc_syscalls.c	Mon Jun  4 14:11:49 2012	(r236562)
+++ head/sys/kern/uipc_syscalls.c	Mon Jun  4 14:18:13 2012	(r236563)
@@ -2184,12 +2184,10 @@ retry_space:
 			/* Append to mbuf chain. */
 			if (mtail != NULL) {
 				mtail->m_next = m0;
-			} else {
-				if (m != NULL)
-					m_cat(m, m0);
-				else
-					m = m0;
-			}
+			} else if (m != NULL)
+				m_last(m)->m_next = m0;
+			else
+				m = m0;
 			mtail = m0;
 
 			/* Keep track of bits processed. */



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