[dpdk-dev] [PATCH] stack: fix possible uninitialized success variable
wangyunjian
wangyunjian at huawei.com
Fri Sep 25 07:00:50 CEST 2020
From: Yunjian Wang <wangyunjian at huawei.com>
This patch fixes an issue that uninitialized 'success'
is used to be compared with '0'.
Coverity issue: 337676
Fixes: 3340202f5954 ("stack: add lock-free implementation")
Cc: stable at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
---
lib/librte_stack/rte_stack_lf_generic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
index 3abbb5342..4850a05ee 100644
--- a/lib/librte_stack/rte_stack_lf_generic.h
+++ b/lib/librte_stack/rte_stack_lf_generic.h
@@ -78,7 +78,7 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
struct rte_stack_lf_elem **last)
{
struct rte_stack_lf_head old_head;
- int success;
+ int success = 0;
/* Reserve num elements, if available */
while (1) {
--
2.23.0
More information about the dev
mailing list