From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Dai Subject: [PATCH v3 4/4] eal: fix end character check in --lcores argument Date: Wed, 27 Jul 2016 19:27:50 +0800 Message-ID: <1469618870-144592-1-git-send-email-wei.dai@intel.com> References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> Cc: Wei Dai To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 8D8FE58F1 for ; Wed, 27 Jul 2016 13:29:22 +0200 (CEST) In-Reply-To: <1469081018-55300-1-git-send-email-wei.dai@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" With --lcores 'a-b@c-d', eal_parse_cores() fails because eal_parse_set() fails due to the next character after lcore set a-b, which is '@'and not ',' or '\0'. There is also a right check immediately after this incorrect check. Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment") Signed-off-by: Wei Dai --- lib/librte_eal/common/eal_common_options.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 1a1bab3..f443a61 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -469,8 +469,6 @@ eal_parse_set(const char *input, uint16_t set[], unsigned num) max = idx; while (isblank(*end)) end++; - if (*end != ',' && *end != '\0') - return -1; } if (*end != ',' && *end != '\0' && -- 2.5.5