diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-02-19 15:51:16 +0100 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-02-19 16:33:07 +0100 |
commit | a815d62d5902fb84c28c77726dbe94fc7528bf36 (patch) | |
tree | 1855611655b573ef3a96ff8f7e5cd22477a98a17 /lib/hash.h | |
parent | 9a74622ca1994669cdb3bac0bb2f6df2febd2744 (diff) |
Hash: typecast error fix
Diffstat (limited to 'lib/hash.h')
-rw-r--r-- | lib/hash.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -184,7 +184,8 @@ mem_hash(void *p, int s) const char *pp = p; const u64 multiplier = 0xb38bc09a61202731ULL; u64 value = 0x001047d54778bcafULL; - for (int i=0;i<s;i++) + int i; + for (i=0;i<s;i++) value = value*multiplier + pp[i]; return ((value >> 32) ^ (value & 0xffffffff)); |