]> git.droids-corp.org - dpdk.git/blobdiff - examples/vmdq/main.c
examples: fix port mask parsing failure handling
[dpdk.git] / examples / vmdq / main.c
index d08826c868f8dd047ec0f023bfec58ff73343892..660be4011e1634db9847b02e7e58e16821970569 100644 (file)
@@ -370,10 +370,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;
 }