summaryrefslogtreecommitdiffstats
path: root/src/libutil/fuzzy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-17 16:11:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-17 16:11:12 +0100
commit940ac5134d8d0a296b30ef880223a29da91299eb (patch)
treeaabf106a909efb2cb26f8f1fa05a4404990df4dc /src/libutil/fuzzy.c
parent0f38bb097e151109c163f9b56db824f39788097e (diff)
downloadrspamd-940ac5134d8d0a296b30ef880223a29da91299eb.tar.gz
rspamd-940ac5134d8d0a296b30ef880223a29da91299eb.zip
Adopt xxhash invocation.
Diffstat (limited to 'src/libutil/fuzzy.c')
-rw-r--r--src/libutil/fuzzy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libutil/fuzzy.c b/src/libutil/fuzzy.c
index a15be12e2..218065b77 100644
--- a/src/libutil/fuzzy.c
+++ b/src/libutil/fuzzy.c
@@ -524,13 +524,14 @@ guint
rspamd_fuzzy_hash (gconstpointer key)
{
rspamd_fuzzy_t *fh = (rspamd_fuzzy_t *)key;
- void *st;
+ XXH64_state_t xxh;
- st = XXH32_init (0xdeadbeef);
- XXH32_update (st, &fh->block_size, sizeof (fh->block_size));
- XXH32_update (st, fh->hash_pipe, rspamd_fuzzy_len (fh));
+ XXH64_reset (&xxh, rspamd_hash_seed ());
- return XXH32_digest (st);
+ XXH64_update (&xxh, &fh->block_size, sizeof (fh->block_size));
+ XXH64_update (&xxh, fh->hash_pipe, rspamd_fuzzy_len (fh));
+
+ return XXH64_digest (&xxh);
}
gboolean