summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-06-04 14:18:13 +0000
committerglebius <glebius@FreeBSD.org>2012-06-04 14:18:13 +0000
commitb0d113b96e7c56d524fb08d8722eaf7c668b5498 (patch)
tree56730bafa4745cff6698bdd53ca1dfaaf99dbfe1
parentdf2b290f0d9df8886ee3832df87616c18dbf2abb (diff)
downloadFreeBSD-src-b0d113b96e7c56d524fb08d8722eaf7c668b5498.zip
FreeBSD-src-b0d113b96e7c56d524fb08d8722eaf7c668b5498.tar.gz
Microoptimisation of code from r236560, also coming from Nginx Inc.
Submitted by: ru
-rw-r--r--sys/kern/uipc_syscalls.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 16933fe..1a30cef 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -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. */
OpenPOWER on IntegriCloud