From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: <dev@dpdk.org>
Cc: <declan.doherty@intel.com>, <pablo.de.lara.guarch@intel.com>,
<akhil.goyal@nxp.com>
Subject: [dpdk-dev] [PATCH v2] app/crypto-perf: fix uninitialized errno value
Date: Tue, 5 Sep 2017 11:47:01 +0530 [thread overview]
Message-ID: <1504592221-32022-1-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1503491044-27863-2-git-send-email-hemant.agrawal@nxp.com>
errno should be initialized to 0 before calling strtol
Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 085aa8f..663f53f 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -137,6 +137,7 @@ parse_range(const char *arg, uint32_t *min, uint32_t *max, uint32_t *inc)
if (copy_arg == NULL)
return -1;
+ errno = 0;
token = strtok(copy_arg, ":");
/* Parse minimum value */
@@ -203,6 +204,7 @@ parse_list(const char *arg, uint32_t *list, uint32_t *min, uint32_t *max)
if (copy_arg == NULL)
return -1;
+ errno = 0;
token = strtok(copy_arg, ",");
/* Parse first value */
--
2.7.4
next prev parent reply other threads:[~2017-09-05 6:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 12:24 [dpdk-dev] [PATCH] examples/l2fwd-crypto: " Hemant Agrawal
2017-08-23 12:24 ` [dpdk-dev] [PATCH] app/crypto-perf: " Hemant Agrawal
2017-09-04 14:54 ` Rybalchenko, Kirill
2017-09-04 14:56 ` De Lara Guarch, Pablo
2017-09-05 6:03 ` Hemant Agrawal
2017-09-05 6:17 ` Hemant Agrawal [this message]
2017-09-05 11:25 ` [dpdk-dev] [PATCH v2] " De Lara Guarch, Pablo
2017-09-04 14:53 ` [dpdk-dev] [PATCH] examples/l2fwd-crypto: " De Lara Guarch, Pablo
2017-09-04 14:53 ` Rybalchenko, Kirill
2017-09-05 11:25 ` De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1504592221-32022-1-git-send-email-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=akhil.goyal@nxp.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).