]> git.droids-corp.org - dpdk.git/blobdiff - examples/qos_meter/main.c
doc: add patch dependency syntax to contributing guide
[dpdk.git] / examples / qos_meter / main.c
index e8112c83a2b0811f647ba2b1cf07480cb8f5f2d6..ce87b2eca262e7aa50d7707b556cbd5e22de13d4 100644 (file)
@@ -166,8 +166,8 @@ app_pkt_handle(struct rte_mbuf *pkt, uint64_t time)
 }
 
 
-static __attribute__((noreturn)) int
-main_loop(__attribute__((unused)) void *dummy)
+static __rte_noreturn int
+main_loop(__rte_unused void *dummy)
 {
        uint64_t current_time, last_time = rte_rdtsc();
        uint32_t lcore_id = rte_lcore_id();
@@ -220,10 +220,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;
 }