From a18f17470709d8a5f1cb918a8db6535890dee683 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Thu, 19 Nov 2020 11:58:55 +0000 Subject: [PATCH] net/pcap: remove local variable shadowing outer one 'ret' is already defined in the function scope, removing the 'ret' in the block scope. Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Reviewed-by: David Marchand --- drivers/net/pcap/rte_eth_pcap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 4930d7d382..a32b1f3f37 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1324,9 +1324,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev, /* phy_mac arg is applied only only if "iface" devarg is provided */ if (rx_queues->phy_mac) { - int ret = eth_pcap_update_mac(rx_queues->queue[0].name, - eth_dev, vdev->device.numa_node); - if (ret == 0) + if (eth_pcap_update_mac(rx_queues->queue[0].name, + eth_dev, vdev->device.numa_node) == 0) internals->phy_mac = 1; } } -- 2.20.1