diff options
author | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2009-08-30 09:06:17 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2009-08-30 09:06:17 -0400 |
commit | 7abd684aeefc6c5a03dcfd779333081be88aaacc (patch) | |
tree | 0c9167d345e00b315956b5d63e6c1f0576e0acf3 | |
parent | d9b2da69993c66b8d7039c15cbe87539e955a6d8 (diff) |
Use nul_random_boolean() in hash.c
-rw-r--r-- | hash.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -62,7 +62,7 @@ random_pointer (void) for (i = 0; i < sizeof (ptr) * 8; ++i) { - uint32_t bit = g_random_boolean(); + uint32_t bit = nul_random_boolean(); ptr |= (bit << i); } @@ -84,8 +84,7 @@ kill_entry (nul_hash_t *hash, hash_entry_t *entry) hash->n_dead++; } -/* It may be worth looking into doing double hashing instead of linear probing - * at some point +/* FIXME: consider double hashing instead of this */ static inline size_t next_probe (size_t index, size_t mask) |