]> git.droids-corp.org - dpdk.git/blobdiff - examples/tep_termination/main.c
examples: fix port mask parsing failure handling
[dpdk.git] / examples / tep_termination / main.c
index b9fffca020a982fa078f691212db43149e969125..232ed59b6ec6b983eaa95752b89f9c7267d08025 100644 (file)
@@ -203,10 +203,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;
 }