Skip to contentSkip to conversation

app/testpmd: fix dead code

PATCH Applied Jingjing Wu 3 participants 3 messages Dec 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: fix dead code

Coverity issue (CID 119254): Control flow issues (DEADCODE).

Fixes 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
---
 app/test-pmd/config.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
app/test-pmd/config.c +1 -4
index e2030b0..7088f6f 100644
@@ -1251,10 +1251,7 @@ dcb_fwd_config_setup(void)
 	/* reinitialize forwarding streams */
 	init_fwd_streams();
 	sm_id = 0;
-	if ((rxp & 0x1) == 0)
-		txp = (portid_t) (rxp + 1);
-	else
-		txp = (portid_t) (rxp - 1);
+	txp = 1;
 	/* get the dcb info on the first RX and TX ports */
 	(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
 	(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);
Signature · 1 line
2.4.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Jingjing Wu
Sent: Tuesday, December 15, 2015 3:43 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: fix dead code

Coverity issue (CID 119254): Control flow issues (DEADCODE).

Fixes 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic

class")