From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 52F1FA0556; Thu, 20 Feb 2020 14:26:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 297331BFD2; Thu, 20 Feb 2020 14:26:44 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AA1621BFC7 for ; Thu, 20 Feb 2020 14:26:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 05:26:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,464,1574150400"; d="scan'208";a="408787821" Received: from silpixa00393944.ir.intel.com ([10.237.223.184]) by orsmga005.jf.intel.com with ESMTP; 20 Feb 2020 05:26:33 -0800 From: Hariprasad Govindharajan To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org, ferruh.yigit@intel.com, stephen@networkplumber.org, david.marchand@redhat.com, Hariprasad Govindharajan Date: Thu, 20 Feb 2020 13:26:31 +0000 Message-Id: <1582205191-14105-1-git-send-email-hariprasad.govindharajan@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testpmd: fix wrong return value in parse_port_list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The function parse_port_list() is designed to return unsigned int value. After sanitizing the inputs, it is returning -1. Changed it to return 0. Fixes: 2df00d562d20 ("app/testpmd: add --portlist option") Cc: hariprasad.govindharajan@intel.com Signed-off-by: Hariprasad Govindharajan --- app/test-pmd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 9d95202..91db508 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2642,7 +2642,7 @@ parse_port_list(const char *list, unsigned int *values, unsigned int maxsize) unsigned int marked[maxsize]; if (list == NULL || values == NULL) - return -1; + return 0; for (i = 0; i < (int)maxsize; i++) marked[i] = 0; -- 2.7.4