From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <cristian.dumitrescu@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id B862447D1
 for <dev@dpdk.org>; Thu, 28 Apr 2016 12:59:50 +0200 (CEST)
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga103.jf.intel.com with ESMTP; 28 Apr 2016 03:59:49 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.24,546,1455004800"; d="scan'208";a="794174986"
Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23])
 by orsmga003.jf.intel.com with ESMTP; 28 Apr 2016 03:59:49 -0700
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.238]) by
 IRSMSX109.ger.corp.intel.com ([169.254.13.57]) with mapi id 14.03.0248.002;
 Thu, 28 Apr 2016 11:59:48 +0100
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Jastrzebski, MichalX K" <michalx.k.jastrzebski@intel.com>, "Zhang, Roy
 Fan" <roy.fan.zhang@intel.com>, "Singh, Jasvinder"
 <jasvinder.singh@intel.com>
CC: "dev@dpdk.org" <dev@dpdk.org>, "Mrozowicz, SlawomirX"
 <slawomirx.mrozowicz@intel.com>
Thread-Topic: [PATCH v3] examples/qos_sched: fix negative loop bound
Thread-Index: AQHRm87r/IrTmuo8lUGISq9x3nRRYZ+fQn6A
Date: Thu, 28 Apr 2016 10:59:47 +0000
Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479A6EC9@IRSMSX108.ger.corp.intel.com>
References: <1461244093-2008-1-git-send-email-michalx.k.jastrzebski@intel.com>
In-Reply-To: <1461244093-2008-1-git-send-email-michalx.k.jastrzebski@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDY5MzE3ZjMtMmI2Ni00NWE1LTgxMDYtOTc2YjJjMWE2ZTIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxNZG9tY1wvQVdNTWo4cXc2ZUY4cENneGUrdm1qZnF2OWVEQkhIc2UrXC9aOD0ifQ==
x-ctpclassification: CTP_IC
x-originating-ip: [163.33.239.180]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v3] examples/qos_sched: fix negative loop
	bound
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Apr 2016 10:59:51 -0000



> -----Original Message-----
> From: Jastrzebski, MichalX K
> Sent: Thursday, April 21, 2016 2:08 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Singh, Jasvinder <jasvinder.singh@intel.com>
> Cc: dev@dpdk.org; Mrozowicz, SlawomirX
> <slawomirx.mrozowicz@intel.com>
> Subject: [PATCH v3] examples/qos_sched: fix negative loop bound
>=20
> From: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
>=20
> Fix issue reported by Coverity.
>=20
> Coverity ID 30704: Negative loop bound
> negative_returns: Using unsigned variable n_tokens in a loop exit conditi=
on.
>=20
> Fixes: de3cfa2c9823 ("sched: initial import")
>=20
> Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
> ---
>  examples/qos_sched/args.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
> index 3e7fd08..7a98e5c 100644
> --- a/examples/qos_sched/args.c
> +++ b/examples/qos_sched/args.c
> @@ -162,7 +162,7 @@ static int
>  app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals=
,
> uint32_t *opt_vals)
>  {
>  	char *string;
> -	uint32_t i, n_tokens;
> +	int i, n_tokens;
>  	char *tokens[MAX_OPT_VALUES];
>=20
>  	if (conf_str =3D=3D NULL || opt_vals =3D=3D NULL || n_vals =3D=3D 0 || =
n_vals >
> MAX_OPT_VALUES)
> --
> 1.9.1

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>