summaryrefslogtreecommitdiffstats
path: root/hashfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'hashfuncs.c')
-rw-r--r--hashfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hashfuncs.c b/hashfuncs.c
index 01a1be1..798d5b8 100644
--- a/hashfuncs.c
+++ b/hashfuncs.c
@@ -154,8 +154,8 @@ unsigned int aphash(const char *key)
for ( ; *key; key++)
{
- hash ^= ((i & 1) == 0) ? ( (hash << 7) ^ (*key) * (hash >> 3)) :
- (~((hash << 11) + ((*key) ^ (hash >> 5))));
+ hash ^= ((i & 1) == 0) ? ( (hash << 7) ^ (const unsigned int) (*key) * (hash >> 3)) :
+ (~((hash << 11) + ((const unsigned int) (*key) ^ (hash >> 5) )));
}
return hash;