From owner-svn-src-all@FreeBSD.ORG Wed Dec 3 22:03:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47B546D6; Wed, 3 Dec 2014 22:03:25 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BC2D7328; Wed, 3 Dec 2014 22:03:24 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sB3M3MBp052453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Dec 2014 01:03:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sB3M3Mxv052452; Thu, 4 Dec 2014 01:03:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 4 Dec 2014 01:03:22 +0300 From: Gleb Smirnoff To: "Andrey V. Elsukov" Subject: Re: svn commit: r275393 - head/sys/netipsec Message-ID: <20141203220322.GS47144@FreeBSD.org> References: <201412020528.sB25SfxW096682@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412020528.sB25SfxW096682@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 22:03:25 -0000 On Tue, Dec 02, 2014 at 05:28:41AM +0000, Andrey V. Elsukov wrote: A> Author: ae A> Date: Tue Dec 2 05:28:40 2014 A> New Revision: 275393 A> URL: https://svnweb.freebsd.org/changeset/base/275393 A> A> Log: A> Remove unneded check. No need to do m_pullup to the size that we prepended. A> A> Sponsored by: Yandex LLC A> A> Modified: A> head/sys/netipsec/keysock.c A> A> Modified: head/sys/netipsec/keysock.c A> ============================================================================== A> --- head/sys/netipsec/keysock.c Tue Dec 2 04:20:50 2014 (r275392) A> +++ head/sys/netipsec/keysock.c Tue Dec 2 05:28:40 2014 (r275393) A> @@ -148,8 +148,6 @@ key_sendup0(rp, m, promisc) A> struct sadb_msg *pmsg; A> A> M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT); A> - if (m && m->m_len < sizeof(struct sadb_msg)) A> - m = m_pullup(m, sizeof(struct sadb_msg)); A> if (!m) { A> PFKEYSTAT_INC(in_nomem); A> m_freem(m); A> - Substitute M_PREPEND with m_prepend() - style: if (m == NULL) - Don't call m_freem(NULL) :) -- Totus tuus, Glebius.