From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 280132951 for ; Tue, 26 Jul 2016 13:52:09 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 26 Jul 2016 04:52:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,424,1464678000"; d="scan'208";a="1029305747" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga002.fm.intel.com with ESMTP; 26 Jul 2016 04:52:08 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX107.ger.corp.intel.com (163.33.3.99) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 26 Jul 2016 12:51:58 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.51]) by irsmsx155.ger.corp.intel.com ([169.254.14.102]) with mapi id 14.03.0248.002; Tue, 26 Jul 2016 12:51:58 +0100 From: "Ananyev, Konstantin" To: "Dai, Wei" , "dev@dpdk.org" CC: "Dai, Wei" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] eal: remove redundant codes to parse --lcores Thread-Index: AQHR5yPBsufDL0xVzEy/wkNfulcCqKAqmXQA Date: Tue, 26 Jul 2016 11:51:57 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B820CA@irsmsx105.ger.corp.intel.com> References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> <1469526749-19698-1-git-send-email-wei.dai@intel.com> In-Reply-To: <1469526749-19698-1-git-send-email-wei.dai@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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 11:52:09 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai > Sent: Tuesday, July 26, 2016 10:52 AM > To: dev@dpdk.org > Cc: Dai, Wei > Subject: [dpdk-dev] [PATCH v2 1/2] eal: remove redundant codes to parse -= -lcores >=20 > local variable i is not referred by other codes in the function eal_parse= _lcores( ), so it can be removed. >=20 > Signed-off-by: Wei Dai > --- > lib/librte_eal/common/eal_common_options.c | 4 ---- > 1 file changed, 4 deletions(-) >=20 > 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 =3D rte_eal_get_configuration(); > static uint16_t set[RTE_MAX_LCORE]; > unsigned idx =3D 0; > - int i; > unsigned count =3D 0; > const char *lcore_start =3D NULL; > const char *end =3D NULL; > @@ -593,9 +592,6 @@ eal_parse_lcores(const char *lcores) > /* Remove all blank characters ahead and after */ > while (isblank(*lcores)) > lcores++; > - i =3D strlen(lcores); > - while ((i > 0) && isblank(lcores[i - 1])) > - i--; I suppose originally it meant to do something like that: while ((i > 0) && isblank(lcores[i - 1])) lcores[i--] =3D 0; to get rid of blank characters at the end of the line, no? Konstantin >=20 > CPU_ZERO(&cpuset); >=20 > -- > 2.5.5