]> git.droids-corp.org - dpdk.git/blobdiff - examples/l2fwd-jobstats/main.c
examples: fix port mask parsing failure handling
[dpdk.git] / examples / l2fwd-jobstats / main.c
index 47a3b09765462b5dfb6ef3dac5c0e77cd3c4fc5d..29d570584005f6d2406b85a91ecdb381dad59770 100644 (file)
@@ -565,10 +565,7 @@ l2fwd_parse_portmask(const char *portmask)
        /* parse hexadecimal string */
        pm = strtoul(portmask, &end, 16);
        if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
-               return -1;
-
-       if (pm == 0)
-               return -1;
+               return 0;
 
        return pm;
 }