summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hashfuncs.c4
-rw-r--r--hashtbl.h4
2 files changed, 4 insertions, 4 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;
diff --git a/hashtbl.h b/hashtbl.h
index 70428f8..97c89a6 100644
--- a/hashtbl.h
+++ b/hashtbl.h
@@ -1,5 +1,5 @@
-#ifndef HASHTBL_H_
-#define HASHTBL_H_
+#ifndef _HASHTBL_H_
+#define _HASHTBL_H_
#include <stdio.h>
#include <stdlib.h>