From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6] af_packet: Fix some klocwork errors Date: Tue, 10 Mar 2015 11:19:46 +0100 Message-ID: <2369370.HKrG2BAiBe@xps13> References: <1425891491-28779-1-git-send-email-changchun.ouyang@intel.com> <54FEAD20.8030901@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Ouyang, Changchun" Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2015-03-10 08:49, Ouyang, Changchun: > From: Wodkowski, PawelX > > > + if (kvlist != 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. No, we don't need to double check. 1/ it's already checked in rte_kvargs_free() 2/ less lines you write, better it is > > > + rte_kvargs_free(kvlist); > > > + return ret; > > > }