app/crypto-perf: fix uninitialized errno value

errno should be initialized to 0 before calling strtol

Fixes: f6cefe253c ("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>
This commit is contained in:
Hemant Agrawal 2017-09-05 11:47:01 +05:30 committed by Pablo de Lara
parent 4554462764
commit 5c49049dd9

View File

@ -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 */