[dpdk-dev] [PATCH] app/crypto-perf: fix uninitialized errno value
Hemant Agrawal
hemant.agrawal at nxp.com
Wed Aug 23 14:24:04 CEST 2017
errno should be initialized to 0 before calling strtol
Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
Cc: stable at dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 085aa8f..77c405c 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 */
--
2.7.4
More information about the dev
mailing list