From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4BE61A04DD
	for <public@inbox.dpdk.org>; Thu, 19 Nov 2020 12:59:31 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 49B2CC916;
	Thu, 19 Nov 2020 12:59:22 +0100 (CET)
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 47996C8C6;
 Thu, 19 Nov 2020 12:59:17 +0100 (CET)
IronPort-SDR: 4/tRvwfUOI52HmmIlqm3OYq8SKBUn0HgNTPy5S21psxFb6Puyv9PHZZW/kka3E81+DevsoTE0V
 +ZGAhHBC9Hsw==
X-IronPort-AV: E=McAfee;i="6000,8403,9809"; a="170494403"
X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="170494403"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 19 Nov 2020 03:59:15 -0800
IronPort-SDR: picvZ2mA9u71fwi/v6z990XKVIYbA3x/uRmA8FmeG/QC96VMEQGCQ0FjRYn2rtymq5i4UdED4j
 8+XbDAUIdC7g==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="341665185"
Received: from silpixa00399752.ir.intel.com (HELO
 silpixa00399752.ger.corp.intel.com) ([10.237.222.180])
 by orsmga002.jf.intel.com with ESMTP; 19 Nov 2020 03:59:14 -0800
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org,
	Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	stable@dpdk.org
Date: Thu, 19 Nov 2020 11:58:55 +0000
Message-Id: <20201119115900.4095566-6-ferruh.yigit@intel.com>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20201119115900.4095566-1-ferruh.yigit@intel.com>
References: <20200824094021.2323605-1-ferruh.yigit@intel.com>
 <20201119115900.4095566-1-ferruh.yigit@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-stable] [v21.02 v3 05/10] net/pcap: remove local variable
	shadowing outer one
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org
Sender: "stable" <stable-bounces@dpdk.org>

'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 <ferruh.yigit@intel.com>
---
v3:
* Eliminated block scope 'ret' variable usage completely.
---
 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..90929478eb 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.26.2