From: Mathieu Desnoyers Date: Thu, 10 Nov 2011 18:55:07 +0000 (-0500) Subject: rculfhash: Add parenthesis around macro arg use in iterator macro X-Git-Tag: v0.7.0~43^2~51 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0b0627bf31ff2393658a0285e342887df6688b18;p=userspace-rcu.git rculfhash: Add parenthesis around macro arg use in iterator macro Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 37eaccf..06e3eb9 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -384,7 +384,7 @@ void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size); for (cds_lfht_first(ht, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ typeof(*(pos)), member); \ - &pos->member != NULL; \ + &(pos)->member != NULL; \ cds_lfht_next(ht, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ typeof(*(pos)), member)) @@ -394,7 +394,7 @@ void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size); for (cds_lfht_lookup(ht, match, hash, key, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ typeof(*(pos)), member); \ - &pos->member != NULL; \ + &(pos)->member != NULL; \ cds_lfht_next_duplicate(ht, match, key, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ typeof(*(pos)), member))