From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E03A9E07 for ; Thu, 14 Apr 2016 13:12:27 +0200 (CEST) Message-Id: Date: 14 Apr 2016 04:12:26 -0700 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 14 Apr 2016 04:12:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,484,1455004800"; d="scan'208";a="958541941" Received: from gklab-246-018.igk.intel.com (HELO stargo) ([10.217.246.18]) by fmsmga002.fm.intel.com with SMTP; 14 Apr 2016 04:12:24 -0700 Received: by stargo (sSMTP sendmail emulation); Thu, 14 Apr 2016 13:16:12 +0200 From: Slawomir Mrozowicz To: cristian.dumitrescu@intel.com Cc: dev@dpdk.org, Slawomir Mrozowicz Subject: [dpdk-dev] [PATCH] examples: fix CID 30704 negative loop bound 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: Thu, 14 Apr 2016 11:12:28 -0000 It fix coverity issue: CID 30704 (#1 of 1): Negative loop bound (NEGATIVE_RETURNS) 8. negative_returns: Using unsigned variable n_tokens in a loop exit condition. Date: Thu, 14 Apr 2016 13:15:49 +0200 Message-Id: <1460632549-20942-1-git-send-email-slawomirx.mrozowicz@intel.com> X-Mailer: git-send-email 1.9.1 Fixes: de3cfa2c9823 ("sched: initial import") Signed-off-by: Slawomir Mrozowicz --- examples/qos_sched/args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; if (conf_str == NULL || opt_vals == NULL || n_vals == 0 || n_vals > MAX_OPT_VALUES) -- 1.9.1 -------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.