summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
14044b3)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
struct cds_lfht *ht;
unsigned long order;
struct cds_lfht *ht;
unsigned long order;
+ /* init_size must be power of two */
+ if (init_size & (init_size - 1))
+ return NULL;
ht = calloc(1, sizeof(struct cds_lfht));
ht->hash_fct = hash_fct;
ht->compare_fct = compare_fct;
ht = calloc(1, sizeof(struct cds_lfht));
ht->hash_fct = hash_fct;
ht->compare_fct = compare_fct;