[PATCH] lib: fix coverity for unused variable

Amit Prakash Shukla amitprakashs at marvell.com
Fri Jun 16 13:06:40 CEST 2023


Removed variable "rc" that stored a return value from a function
rte_lpm6_lookup_bulk_func.

Coverity issue: 385595
Fixes: 20365d793e45 ("node: add IPv6 lookup node")

Signed-off-by: Amit Prakash Shukla <amitprakashs at marvell.com>
---
 lib/node/ip6_lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/node/ip6_lookup.c b/lib/node/ip6_lookup.c
index e4bbc7ed67..2b20194295 100644
--- a/lib/node/ip6_lookup.c
+++ b/lib/node/ip6_lookup.c
@@ -135,7 +135,7 @@ ip6_lookup_node_process_scalar(struct rte_graph *graph, struct rte_node *node,
 		node_mbuf_priv1(mbuf3, dyn)->ttl = ipv6_hdr->hop_limits;
 		rte_memcpy(ip_batch[3], ipv6_hdr->dst_addr, 16);
 
-		rc = rte_lpm6_lookup_bulk_func(lpm6, ip_batch, next_hop, 4);
+		rte_lpm6_lookup_bulk_func(lpm6, ip_batch, next_hop, 4);
 
 		next_hop[0] = (next_hop[0] < 0) ? (int32_t)drop_nh : next_hop[0];
 		node_mbuf_priv1(mbuf0, dyn)->nh = (uint16_t)next_hop[0];
-- 
2.25.1



More information about the dev mailing list