From: Jan Maria Matejka Date: Tue, 27 Nov 2018 07:49:31 +0000 (+0100) Subject: Hash: mem_hash doesn't modify the memory, declared constant X-Git-Tag: v2.0.3~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0642fb4d456fe12e1bbeb2ffc2149433f228c02e;p=thirdparty%2Fbird.git Hash: mem_hash doesn't modify the memory, declared constant --- diff --git a/lib/hash.h b/lib/hash.h index 8809aedc9..ea4ca6dde 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);