stack: fix uninitialized variable

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@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
Yunjian Wang 2020-09-25 13:00:50 +08:00 committed by David Marchand
parent 4ee8dc7f66
commit d1ca6cfd3c

View File

@ -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) {