From: Thomas Monjalon <thomas@monjalon.net>
To: Amit Prakash Shukla <amitprakashs@marvell.com>
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
dev@dpdk.org, jerinj@marvell.com
Subject: Re: [PATCH] lib: fix coverity for unused variable
Date: Tue, 27 Jun 2023 15:45:26 +0200 [thread overview]
Message-ID: <2509685.TLnPLrj5Ze@thomas> (raw)
In-Reply-To: <20230616110640.3642684-1-amitprakashs@marvell.com>
16/06/2023 13:06, Amit Prakash Shukla:
> Removed variable "rc" that stored a return value from a function
> rte_lpm6_lookup_bulk_func.
You are not really removing the variable, right?
It looks you just stop storing the return of this function.
Whouldn't it better to check the return code?
> Coverity issue: 385595
> Fixes: 20365d793e45 ("node: add IPv6 lookup node")
>
> Signed-off-by: Amit Prakash Shukla <amitprakashs@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];
>
next prev parent reply other threads:[~2023-06-27 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 11:06 [PATCH] lib: fix coverity for unused variable Amit Prakash Shukla
2023-06-27 13:45 ` Thomas Monjalon [this message]
2023-06-27 16:05 ` [EXT] " Amit Prakash Shukla
2023-06-27 21:52 ` Thomas Monjalon
2023-06-27 22:17 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2509685.TLnPLrj5Ze@thomas \
--to=thomas@monjalon.net \
--cc=amitprakashs@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=pbhagavatula@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.