summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/jhash.h2
-rw-r--r--src/filter.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/jhash.h b/include/jhash.h
index 38b8780..d164e38 100644
--- a/include/jhash.h
+++ b/include/jhash.h
@@ -87,7 +87,7 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
/* A special optimized version that handles 1 or more of u32s.
* The length parameter here is the number of u32s in the key.
*/
-static inline u32 jhash2(u32 *k, u32 length, u32 initval)
+static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
{
u32 a, b, c, len;
diff --git a/src/filter.c b/src/filter.c
index c4854bb..83c2eb3 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -49,7 +49,7 @@ static uint32_t hash(const void *data, struct hashtable *table)
static uint32_t hash6(const void *data, struct hashtable *table)
{
- return jhash(data, sizeof(uint32_t)*4, 0) % table->hashsize;
+ return jhash2(data, 4, 0) % table->hashsize;
}
static int compare(const void *data1, const void *data2)