From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 108ED58D6 for ; Tue, 26 Jul 2016 11:54:02 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 26 Jul 2016 02:54:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,424,1464678000"; d="scan'208";a="1024053407" Received: from dpdk2.bj.intel.com ([172.16.182.189]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2016 02:54:00 -0700 From: Wei Dai To: dev@dpdk.org Cc: Wei Dai Date: Tue, 26 Jul 2016 17:52:29 +0800 Message-Id: <1469526749-19698-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 v2 1/2] eal: remove redundant codes to parse --lcores 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: Tue, 26 Jul 2016 09:54:03 -0000 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 --- lib/librte_eal/common/eal_common_options.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 481c732..c5bf98c 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); -- 2.5.5