From: David Marchand Date: Wed, 13 Feb 2019 20:06:58 +0000 (+0100) Subject: eal: remove dead code in core list parsing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=33df941d79ad7966b82d882ad277e625f6c3a017;p=dpdk.git eal: remove dead code in core list parsing 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") Cc: stable@dpdk.org Signed-off-by: David Marchand --- diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 9e61ee436c..8a431457b0 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 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 @@ eal_parse_corelist(const char *corelist) 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++) {