blob: 41699ad78b61a3d1dd927331542226c4787241ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff --git a/src/hash.c b/src/hash.c
index 27d2756..111149a 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -109,13 +109,13 @@ void hash_release(hash_t * const table)
/** hash a key for our table lookup */
static int _hash_key(hash_t *table, const char *key)
{
- int hash = 0;
+ unsigned int hash = 0;
int shift = 0;
const char *c = key;
while (*c != '\0') {
/* assume 32 bit ints */
- hash ^= ((int)*c++ << shift);
+ hash ^= ((unsigned int)*c++ << shift);
shift += 8;
if (shift > 24) shift = 0;
}
|