From: Mathieu Desnoyers Date: Wed, 22 Oct 2014 11:55:05 +0000 (-0400) Subject: Fix: lfstack reversed empty/non-empty return value X-Git-Tag: v0.9.0~76 X-Git-Url: https://git.lttng.org/?p=urcu.git;a=commitdiff_plain;h=e47048cc8c4830fbfbe7169d743e58231f0549bc;hp=817a017859ab974276438fbebee50e07aeb6f346 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 --- diff --git a/urcu/static/lfstack.h b/urcu/static/lfstack.h index 63af91a..41895a6 100644 --- a/urcu/static/lfstack.h +++ b/urcu/static/lfstack.h @@ -158,7 +158,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); } /*