diff options
author | Eric Anholt <eric@anholt.net> | 2012-11-06 17:23:35 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2012-11-06 17:26:52 -0800 |
commit | ae79c77c2d18214a6680623bdadbb566c4c7adfd (patch) | |
tree | a1a6bfe9d3dad6b0d71449c1a997e137f4d98c59 /fnv_hash.c | |
parent | c2a4a1c274559d479ec14bea8f412e422db6b6b5 (diff) |
Fix the prototype of fnv1_hash_string().
Diffstat (limited to 'fnv_hash.c')
-rw-r--r-- | fnv_hash.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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; |