examples/eventdev: fix build with gcc 10
[dpdk.git] / examples / l3fwd-acl / main.c
index 0abb8cb..fa92a28 100644 (file)
@@ -1968,7 +1968,12 @@ main(int argc, char **argv)
                                "rte_eth_dev_adjust_nb_rx_tx_desc: err=%d, port=%d\n",
                                ret, portid);
 
-               rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+               ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+               if (ret < 0)
+                       rte_exit(EXIT_FAILURE,
+                               "rte_eth_macaddr_get: err=%d, port=%d\n",
+                               ret, portid);
+
                print_ethaddr(" Address:", &ports_eth_addr[portid]);
                printf(", ");