X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=rculfhash.c;h=174c11cf7babb4a35a7d533b3dd557ab221ae3dc;hp=807a22d177ed85b6d853dbfe71757342104e33a5;hb=5dc45f257a9242fa600dd8a3b245f601cb5b17a0;hpb=a481e5ffa28452175e9d70467a07fd131c957728 diff --git a/rculfhash.c b/rculfhash.c index 807a22d..174c11c 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -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;