* [dpdk-dev] [PATCH] port: fix dead code in ring
@ 2021-04-07 10:59 Cristian Dumitrescu
2021-04-19 17:41 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Cristian Dumitrescu @ 2021-04-07 10:59 UTC (permalink / raw)
To: dev
Fix logically dead code in ring port.
Coverity issue: 369664
Fixes: 77a413017c2d ("port: add ring SWX port")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_port/rte_swx_port_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_port/rte_swx_port_ring.c b/lib/librte_port/rte_swx_port_ring.c
index 4df720d91..8a076a213 100644
--- a/lib/librte_port/rte_swx_port_ring.c
+++ b/lib/librte_port/rte_swx_port_ring.c
@@ -195,7 +195,7 @@ writer_create(void *args)
goto error;
p->params.name = strdup(params->name);
- if (!p)
+ if (!p->params.name)
goto error;
p->pkts = calloc(params->burst_size, sizeof(struct rte_mbuf *));
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] port: fix dead code in ring
2021-04-07 10:59 [dpdk-dev] [PATCH] port: fix dead code in ring Cristian Dumitrescu
@ 2021-04-19 17:41 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-04-19 17:41 UTC (permalink / raw)
To: Cristian Dumitrescu; +Cc: dev
07/04/2021 12:59, Cristian Dumitrescu:
> Fix logically dead code in ring port.
>
> Coverity issue: 369664
> Fixes: 77a413017c2d ("port: add ring SWX port")
>
> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
It's not really fixing dead code but allocation check.
With title fixed, applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-19 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 10:59 [dpdk-dev] [PATCH] port: fix dead code in ring Cristian Dumitrescu
2021-04-19 17:41 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).