From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A247A9A9A for ; Wed, 11 Mar 2015 02:19:27 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 10 Mar 2015 18:17:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,378,1422950400"; d="scan'208";a="696866351" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga002.jf.intel.com with ESMTP; 10 Mar 2015 18:19:25 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 11 Mar 2015 09:18:51 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.26]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.45]) with mapi id 14.03.0224.002; Wed, 11 Mar 2015 09:18:50 +0800 From: "Ouyang, Changchun" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v6] af_packet: Fix some klocwork errors Thread-Index: AQHQWuJ+q5UAwZvBuk26V9/B4554Cp0U3tAAgACJCoD//5O7AIABgJlg Date: Wed, 11 Mar 2015 01:18:49 +0000 Message-ID: References: <1425891491-28779-1-git-send-email-changchun.ouyang@intel.com> <54FEAD20.8030901@intel.com> <2369370.HKrG2BAiBe@xps13> In-Reply-To: <2369370.HKrG2BAiBe@xps13> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v6] af_packet: Fix some klocwork errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 01:19:28 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, March 10, 2015 6:20 PM > To: Ouyang, Changchun > Cc: dev@dpdk.org; Wodkowski, PawelX > Subject: Re: [dpdk-dev] [PATCH v6] af_packet: Fix some klocwork errors >=20 > 2015-03-10 08:49, Ouyang, Changchun: > > From: Wodkowski, PawelX > > > > + if (kvlist !=3D NULL) > > > > > > No need for if(). This part was fine previous patch. > > > > > > > If kvlist is NULL, no reason to call rte_kvargs_free to free it. > > So, adding this test is better. >=20 > No, we don't need to double check. > 1/ it's already checked in rte_kvargs_free() 2/ less lines you write, bet= ter it is >=20 At least 2 guys vote for removing the check, then 2 vs. 1, you win :-) Will update it in v7 Thanks for comments! Changchun =20