X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=rculfhash.c;h=b74739f29a30f1953b3e6447fcf8daa44e069354;hb=dd51e0ad14ab677d0fab45b492150adce2ee863e;hp=cd60f5f4db8e7409668b3598ec073fdff5ce5752;hpb=1475579ca651164ea74eb0c9f727baad991098af;p=urcu.git diff --git a/rculfhash.c b/rculfhash.c index cd60f5f..b74739f 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -803,7 +803,7 @@ int _cds_lfht_remove(struct cds_lfht *ht, struct rcu_table *t, */ if (dummy_removal) - index = hash & ((t->size >> 1) - 1); + index = hash & ((t->size == 1) ? 0 : (t->size >> 1) - 1); else index = hash & (t->size - 1); order = get_count_order_ulong(index + 1);