summaryrefslogtreecommitdiff
path: root/lib/hash.h
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-11-27 08:49:31 +0100
committerJan Maria Matejka <mq@ucw.cz>2018-12-04 14:00:53 +0100
commit0642fb4d456fe12e1bbeb2ffc2149433f228c02e (patch)
tree4dfbab032901fb8946e0cc14d21522262d2ac715 /lib/hash.h
parentd73c4ac869048e60276c5e568450c7342bc0bc8a (diff)
Hash: mem_hash doesn't modify the memory, declared constant
Diffstat (limited to 'lib/hash.h')
-rw-r--r--lib/hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hash.h b/lib/hash.h
index 8809aedc..ea4ca6dd 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -202,7 +202,7 @@ mem_hash_init(u64 *h)
}
static inline void
-mem_hash_mix(u64 *h, void *p, uint s)
+mem_hash_mix(u64 *h, const void *p, uint s)
{
const u64 multiplier = 0xb38bc09a61202731ULL;
const char *pp = p;
@@ -222,7 +222,7 @@ mem_hash_value(u64 *h)
}
static inline uint
-mem_hash(void *p, uint s)
+mem_hash(const void *p, uint s)
{
static u64 h;
mem_hash_init(&h);