examples: fix port mask parsing failure handling
[dpdk.git] / examples / performance-thread / l3fwd-thread / main.c
index 84c1d7b..e32802a 100644 (file)
@@ -2681,10 +2681,7 @@ 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;
 }