From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id B14709A8E for ; Tue, 10 Mar 2015 11:20:22 +0100 (CET) Received: by wivr20 with SMTP id r20so28795069wiv.5 for ; Tue, 10 Mar 2015 03:20:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=SbjVTtwJ0y8aah2b+H1/WAv2J9sLlkIC/u5OdYLG4Uo=; b=IYvBLuYN1DdaXji+iwIQU5hUJl9lPpURXNkA9NAlv217FCQaICtIuNLd/MNv6pliY4 6RGBoGiAg3GgYexZJrljzWCU5Sdr0NwpCBPlKpZNT28P4tXrPr774USu6Sk1RB7E7y/M jpOOdVlQI2SNW6dP3YN/fqTD28Ik11exPD2yRhdWc8ZRPrsdQrpkUYqyNFF/JLgroGmB br3B3BfadX07rc91qnutSuwv0D64C0Rt7o1XP3lvGHxeXe3GbQbwcsBUk1+XofJ1l64f CuJ+he4YStM7zYoVFt8i2t3WjJpqdZdo0ANuVnkAo3SJ10S0XhY63FG/JLXgQFY4dJbx raRw== X-Gm-Message-State: ALoCoQn9KH8Gp41t3CDgJEpwsSnV1AQXoBUHYpaQ1EkHOrhExOgymFUd7a6qf7wMrffq9KwK+q/J X-Received: by 10.180.126.69 with SMTP id mw5mr114229016wib.12.1425982822444; Tue, 10 Mar 2015 03:20:22 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ha5sm19597374wib.1.2015.03.10.03.20.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 03:20:21 -0700 (PDT) From: Thomas Monjalon To: "Ouyang, Changchun" Date: Tue, 10 Mar 2015 11:19:46 +0100 Message-ID: <2369370.HKrG2BAiBe@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: References: <1425891491-28779-1-git-send-email-changchun.ouyang@intel.com> <54FEAD20.8030901@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Tue, 10 Mar 2015 10:20:22 -0000 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; > > > }