From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 97F611B1F3; Wed, 13 Feb 2019 21:07:13 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFB896696D; Wed, 13 Feb 2019 20:07:12 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-16.brq.redhat.com [10.40.204.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id D25AA16E4A; Wed, 13 Feb 2019 20:07:10 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: didier.pallard@6wind.com, thomas@monjalon.net, hari.kumarx.vemula@intel.com, stable@dpdk.org Date: Wed, 13 Feb 2019 21:06:58 +0100 Message-Id: <1550088419-10812-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 13 Feb 2019 20:07:12 +0000 (UTC) Subject: [dpdk-stable] [PATCH 1/2] eal: remove dead code in corelist parsing X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 20:07:13 -0000 We don't need to look for trailing spaces. This is a copy/paste block from eal_parse_coremask(). Remove it and the associated comment. Fixes: d888cb8b9613 ("eal: add core list input format") Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_options.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index b766252..c89f7ab 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -567,10 +567,10 @@ static int xdigit2val(unsigned char c) eal_parse_corelist(const char *corelist) { struct rte_config *cfg = rte_eal_get_configuration(); - int i, idx = 0; unsigned count = 0; char *end = NULL; int min, max; + int idx; if (eal_service_cores_parsed()) RTE_LOG(WARNING, EAL, @@ -580,12 +580,9 @@ static int xdigit2val(unsigned char c) if (corelist == NULL) return -1; - /* Remove all blank characters ahead and after */ + /* Remove all blank characters ahead */ while (isblank(*corelist)) corelist++; - i = strlen(corelist); - while ((i > 0) && isblank(corelist[i - 1])) - i--; /* Reset config */ for (idx = 0; idx < RTE_MAX_LCORE; idx++) { -- 1.8.3.1