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.8.6~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0fba1252d0fb2eae2054faad7b657cb296780421;p=userspace-rcu.git 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 0be9594..b49eb20 100644 --- a/urcu/static/lfstack.h +++ b/urcu/static/lfstack.h @@ -148,7 +148,7 @@ bool _cds_lfs_push(struct cds_lfs_stack *s, if (old_head == head) break; } - return ___cds_lfs_empty_head(head); + return !___cds_lfs_empty_head(head); } /*