summaryrefslogtreecommitdiff
path: root/fnv_hash.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-11-06 17:23:35 -0800
committerEric Anholt <eric@anholt.net>2012-11-06 17:26:52 -0800
commitae79c77c2d18214a6680623bdadbb566c4c7adfd (patch)
treea1a6bfe9d3dad6b0d71449c1a997e137f4d98c59 /fnv_hash.c
parentc2a4a1c274559d479ec14bea8f412e422db6b6b5 (diff)
Fix the prototype of fnv1_hash_string().
Diffstat (limited to 'fnv_hash.c')
-rw-r--r--fnv_hash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fnv_hash.c b/fnv_hash.c
index d34bf81..8ca4cd8 100644
--- a/fnv_hash.c
+++ b/fnv_hash.c
@@ -36,15 +36,15 @@
#include "fnv_hash.h"
uint32_t
-fnv1_hash_string(const void *key)
+fnv1_hash_string(const char *key)
{
uint32_t hash = 2166136261ul;
- const unsigned char *str = key;
+ const uint8_t *bytes = (uint8_t *)key;
- while (*str != 0) {
- hash ^= *str;
+ while (*bytes != 0) {
+ hash ^= *bytes;
hash = hash * 0x01000193;
- str++;
+ bytes++;
}
return hash;