From: Mathieu Desnoyers Date: Tue, 29 Apr 2014 20:01:57 +0000 (+0200) Subject: Fix: incorrect parenthesis in cds_hlist_for_each_entry_safe_2 X-Git-Tag: v0.9.0~91 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=79efd9b350e07a499b3620ddde4860b8378fcf00;p=userspace-rcu.git Fix: incorrect parenthesis in cds_hlist_for_each_entry_safe_2 commit db903109f0031c831e8fdc95cb7197996e53f46d introduced a regression in cds_hlist_for_each_entry_safe_2(): incorrect parenthesis assign "e" to 1, rather than assign "e" to the next pointer, and evaluating the expression to 1 (comma expression). Reported-by: Daniel Thibault Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/hlist.h b/urcu/hlist.h index 462f493..3444811 100644 --- a/urcu/hlist.h +++ b/urcu/hlist.h @@ -104,7 +104,7 @@ void cds_hlist_del(struct cds_hlist_node *elem) : cds_hlist_entry((head)->next, __typeof__(*entry), member)); \ (entry != NULL) && (e = (entry->member.next == NULL ? NULL \ : cds_hlist_entry(entry->member.next, \ - __typeof__(*entry), member), 1)); \ + __typeof__(*entry), member)), 1); \ entry = e) #endif /* _KCOMPAT_HLIST_H */