summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2009-08-30 09:06:17 -0400
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2009-08-30 09:06:17 -0400
commit7abd684aeefc6c5a03dcfd779333081be88aaacc (patch)
tree0c9167d345e00b315956b5d63e6c1f0576e0acf3
parentd9b2da69993c66b8d7039c15cbe87539e955a6d8 (diff)
Use nul_random_boolean() in hash.c
-rw-r--r--hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index 05854e5..2c2e982 100644
--- a/hash.c
+++ b/hash.c
@@ -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)