From d23382b83c64023453d212919d3807582da3f50b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 22 Oct 2014 07:55:05 -0400 Subject: [PATCH] Fix: lfstack reversed empty/non-empty return value The return value of lfstack push operation is logically reversed compared to the documentation, and compared to wfstack and wfcqueue. Signed-off-by: Mathieu Desnoyers --- urcu/static/lfstack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urcu/static/lfstack.h b/urcu/static/lfstack.h index 9531de5..4799bc4 100644 --- a/urcu/static/lfstack.h +++ b/urcu/static/lfstack.h @@ -160,7 +160,7 @@ bool _cds_lfs_push(cds_lfs_stack_ptr_t u_s, if (old_head == head) break; } - return ___cds_lfs_empty_head(head); + return !___cds_lfs_empty_head(head); } /* -- 2.34.1