From: Wei Dai Date: Wed, 27 Jul 2016 11:22:31 +0000 (+0800) Subject: eal: remove redundant code to parse --lcores X-Git-Tag: spdx-start~6065 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=75edc66a912eb4aee472ad8018dcde21c469e467;p=dpdk.git eal: remove redundant code to parse --lcores local variable i is not referred by other codes in the function eal_parse_lcores( ), so it can be removed. Signed-off-by: Wei Dai Acked-by: Ferruh Yigit --- diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 481c732b18..c5bf98cd2e 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -578,7 +578,6 @@ eal_parse_lcores(const char *lcores) struct rte_config *cfg = rte_eal_get_configuration(); static uint16_t set[RTE_MAX_LCORE]; unsigned idx = 0; - int i; unsigned count = 0; const char *lcore_start = NULL; const char *end = NULL; @@ -593,9 +592,6 @@ eal_parse_lcores(const char *lcores) /* Remove all blank characters ahead and after */ while (isblank(*lcores)) lcores++; - i = strlen(lcores); - while ((i > 0) && isblank(lcores[i - 1])) - i--; CPU_ZERO(&cpuset);