Fix CAA_BITS_PER_lONG typo
[urcu.git] / rculfhash.c
index d786a3da743881e5bc0b406d57dd88d5e915401e..ebefa92ad8460c0d49501b67261b9087832167e0 100644 (file)
@@ -454,7 +454,7 @@ unsigned int fls_u32(uint32_t x)
 
 unsigned int fls_ulong(unsigned long x)
 {
-#if (CAA_BITS_PER_lONG == 32)
+#if (CAA_BITS_PER_LONG == 32)
        return fls_u32(x);
 #else
        return fls_u64(x);
@@ -1330,6 +1330,7 @@ struct cds_lfht *_cds_lfht_new(cds_lfht_hash_fct hash_fct,
        init_size = max(init_size, min_alloc_size);
        ht = calloc(1, sizeof(struct cds_lfht));
        assert(ht);
+       ht->flags = flags;
        ht->hash_fct = hash_fct;
        ht->compare_fct = compare_fct;
        ht->hash_seed = hash_seed;
@@ -1345,13 +1346,12 @@ struct cds_lfht *_cds_lfht_new(cds_lfht_hash_fct hash_fct,
        alloc_split_items_count(ht);
        /* this mutex should not nest in read-side C.S. */
        pthread_mutex_init(&ht->resize_mutex, NULL);
-       ht->flags = flags;
        order = get_count_order_ulong(init_size);
        ht->t.resize_target = 1UL << order;
-       cds_lfht_create_dummy(ht, 1UL << order);
-       ht->t.size = 1UL << order;
        ht->min_alloc_size = min_alloc_size;
        ht->min_alloc_order = get_count_order_ulong(min_alloc_size);
+       cds_lfht_create_dummy(ht, 1UL << order);
+       ht->t.size = 1UL << order;
        return ht;
 }
 
This page took 0.023334 seconds and 4 git commands to generate.