summaryrefslogtreecommitdiff
path: root/lib/ntdb/test/api-13-delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ntdb/test/api-13-delete.c')
-rw-r--r--lib/ntdb/test/api-13-delete.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ntdb/test/api-13-delete.c b/lib/ntdb/test/api-13-delete.c
index 182252b109..9bf4026d12 100644
--- a/lib/ntdb/test/api-13-delete.c
+++ b/lib/ntdb/test/api-13-delete.c
@@ -8,14 +8,13 @@
#include "logging.h"
/* We rig the hash so adjacent-numbered records always clash. */
-static uint64_t clash(const void *key, size_t len, uint64_t seed, void *priv)
+static uint32_t clash(const void *key, size_t len, uint32_t seed, void *priv)
{
- return ((uint64_t)*(const unsigned int *)key)
- << (64 - NTDB_TOPLEVEL_HASH_BITS - 1);
+ return *((const unsigned int *)key) / 2;
}
/* We use the same seed which we saw a failure on. */
-static uint64_t fixedhash(const void *key, size_t len, uint64_t seed, void *p)
+static uint32_t fixedhash(const void *key, size_t len, uint32_t seed, void *p)
{
return hash64_stable((const unsigned char *)key, len,
*(uint64_t *)p);