From 13d6aedafcd6a8ac9e8d5429e096bdfeb61b06d2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 31 Oct 2015 23:48:05 +0300 Subject: [PATCH] Fix hash function invocation. --- src/libutil/bloom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libutil/bloom.c b/src/libutil/bloom.c index c3e8b4c8e..1b267f358 100644 --- a/src/libutil/bloom.c +++ b/src/libutil/bloom.c @@ -135,7 +135,7 @@ rspamd_bloom_del (rspamd_bloom_filter_t * bloom, const gchar *s) } len = strlen (s); for (n = 0; n < bloom->nfuncs; ++n) { - v = XXH32 (s, len, bloom->seeds[n]) % bloom->asize; + v = XXH64 (s, len, bloom->seeds[n]) % bloom->asize; DECBIT (bloom->a, v, t); } @@ -154,7 +154,7 @@ rspamd_bloom_check (rspamd_bloom_filter_t * bloom, const gchar *s) } len = strlen (s); for (n = 0; n < bloom->nfuncs; ++n) { - v = XXH32 (s, len, bloom->seeds[n]) % bloom->asize; + v = XXH64 (s, len, bloom->seeds[n]) % bloom->asize; if (!(GETBIT (bloom->a, v))) { return FALSE; } -- 2.39.5