diff options
Diffstat (limited to 'custom_mutators/gramatron/hashmap.c')
-rw-r--r-- | custom_mutators/gramatron/hashmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/custom_mutators/gramatron/hashmap.c b/custom_mutators/gramatron/hashmap.c index 09715b87..4f97e085 100644 --- a/custom_mutators/gramatron/hashmap.c +++ b/custom_mutators/gramatron/hashmap.c @@ -151,7 +151,7 @@ static unsigned long crc32_tab[] = { /* Return a 32-bit CRC of the contents of the buffer. */ -unsigned long crc32(const unsigned char *s, unsigned int len) { +unsigned long custom_crc32(const unsigned char *s, unsigned int len) { unsigned int i; unsigned long crc32val; @@ -171,8 +171,9 @@ unsigned long crc32(const unsigned char *s, unsigned int len) { * Hashing function for a string */ unsigned int hashmap_hash_int(hashmap_map *m, char *keystring) { + unsigned int keystring_len = strlen(keystring); - unsigned long key = crc32((unsigned char *)(keystring), strlen(keystring)); + unsigned long key = custom_crc32((unsigned char *)(keystring), keystring_len); /* Robert Jenkins' 32 bit Mix Function */ key += (key << 12); |