port: fix dead code in ring
Checks
Commit Message
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(-)
Comments
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.
@@ -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 *));