]> git.droids-corp.org - dpdk.git/blobdiff - examples/l3fwd/main.c
examples: fix port mask parsing failure handling
[dpdk.git] / examples / l3fwd / main.c
index 24ede42903db0e077674e8a26e8282e7020191d0..de6c62293afffc25cf0ea5032400186062bfc976 100644 (file)
@@ -340,10 +340,7 @@ 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;
 }