examples/eventdev: fix build with gcc 10
[dpdk.git] / examples / l2fwd-keepalive / main.c
index 21278ee..b368349 100644 (file)
@@ -665,7 +665,12 @@ main(int argc, char **argv)
                                "Cannot adjust number of descriptors: err=%d, port=%u\n",
                                ret, portid);
 
-               rte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);
+               ret = rte_eth_macaddr_get(portid,
+                                         &l2fwd_ports_eth_addr[portid]);
+               if (ret < 0)
+                       rte_exit(EXIT_FAILURE,
+                               "Cannot mac address: err=%d, port=%u\n",
+                               ret, portid);
 
                /* init one RX queue */
                fflush(stdout);