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