From: Mathieu Desnoyers Date: Sun, 11 Sep 2011 01:14:59 +0000 (-0700) Subject: rculfhash: fix fini_table for size 1 X-Git-Tag: v0.7.0~43^2~164 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b9e36678a644361b1043b2f20e023d6434377fb4;p=urcu.git rculfhash: fix fini_table for size 1 Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index f6c901b..003ab0b 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -895,7 +895,7 @@ void fini_table(struct cds_lfht *ht, struct rcu_table *t, * removal so gc lookups use non-logically-removed dummy * nodes. */ - t->size = 1UL << (i - 2); + t->size = (i == 1) ? 0 : 1UL << (i - 2); /* Unlink */ for (j = 0; j < len; j++) { struct cds_lfht_node *fini_node =