]> git.droids-corp.org - dpdk.git/blobdiff - examples/link_status_interrupt/main.c
examples: fix port mask parsing failure handling
[dpdk.git] / examples / link_status_interrupt / main.c
index 9bbcadfcf8b95fec366a737cba7eed099e917fd4..d1ce6abed5a20f8a4ea0b343007926cc4b920ce8 100644 (file)
@@ -314,10 +314,7 @@ lsi_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;
 }