rculfhash test: Check random pool size
[urcu.git] / rculfhash.c
index 807a22d177ed85b6d853dbfe71757342104e33a5..174c11cf7babb4a35a7d533b3dd557ab221ae3dc 100644 (file)
@@ -622,7 +622,7 @@ struct cds_lfht *cds_lfht_new(cds_lfht_hash_fct hash_fct,
        unsigned long order;
 
        /* init_size must be power of two */
-       if (init_size & (init_size - 1))
+       if (init_size && (init_size & (init_size - 1)))
                return NULL;
        ht = calloc(1, sizeof(struct cds_lfht));
        ht->hash_fct = hash_fct;
This page took 0.022399 seconds and 4 git commands to generate.