]> git.droids-corp.org - dpdk.git/blobdiff - app/test-crypto-perf/cperf_options_parsing.c
app/crypto-perf: fix uninitialized errno value
[dpdk.git] / app / test-crypto-perf / cperf_options_parsing.c
index 085aa8fe81385a34235bd4ceffc9e3fa094d7866..663f53fe26efcd94cf90b5d81040fb3daa495e83 100644 (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 */