From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 27 Jul 2016 04:29:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,429,1464678000"; d="scan'208";a="740414737" Received: from dpdk2.bj.intel.com ([172.16.182.189]) by FMSMGA003.fm.intel.com with ESMTP; 27 Jul 2016 04:29:19 -0700 From: Wei Dai To: dev@dpdk.org Cc: Wei Dai Date: Wed, 27 Jul 2016 19:27:50 +0800 Message-Id: <1469618870-144592-1-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1469081018-55300-1-git-send-email-wei.dai@intel.com> References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> Subject: [dpdk-dev] [PATCH v3 4/4] eal: fix end character check in --lcores argument 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, 27 Jul 2016 11:29:23 -0000 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