X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_hash.c;h=043a33a9353105eac57e2363693bdfb41c49f12c;hp=fe650f36a083a81d08991bf1a6b18c85baccd098;hb=747d725c1dd45d5072e0e411642c4d5c6403b4be;hpb=996ff57cc0490bc4ae26de70e9ebe620ff18515f diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index fe650f3..043a33a 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -896,7 +896,7 @@ int main(int argc, char **argv) return -1; } - if (min_hash_alloc_size && min_hash_alloc_size * (min_hash_alloc_size - 1)) { + if (min_hash_alloc_size && min_hash_alloc_size & (min_hash_alloc_size - 1)) { printf("Error: Min hash alloc size %lu is not a power of 2.\n", min_hash_alloc_size); return -1; @@ -967,7 +967,7 @@ int main(int argc, char **argv) * thread from the point of view of resize. */ rcu_register_thread(); - test_ht = cds_lfht_new(init_hash_size, min_hash_alloc_size, + test_ht = cds_lfht_new(init_hash_size, min_hash_alloc_size, (1UL << 18), (opt_auto_resize ? CDS_LFHT_AUTO_RESIZE : 0) | CDS_LFHT_ACCOUNTING, NULL); ret = populate_hash();