{
/* Thanks to pierre@demartines.com for the pointer */
uint64_t hash= FNV_64_INIT;
- size_t x= 0;
- for (x= 0; x < key_length; x++)
+ for (size_t x= 0; x < key_length; x++)
{
hash *= FNV_64_PRIME;
hash ^= (uint64_t)key[x];
uint32_t hashkit_fnv1a_64(const char *key, size_t key_length)
{
uint32_t hash= (uint32_t) FNV_64_INIT;
- size_t x= 0;
- for (x= 0; x < key_length; x++)
+ for (size_t x= 0; x < key_length; x++)
{
uint32_t val= (uint32_t)key[x];
hash ^= val;
uint32_t hashkit_fnv1_32(const char *key, size_t key_length)
{
uint32_t hash= FNV_32_INIT;
- size_t x= 0;
- for (x= 0; x < key_length; x++)
+ for (size_t x= 0; x < key_length; x++)
{
uint32_t val= (uint32_t)key[x];
hash *= FNV_32_PRIME;
uint32_t hashkit_fnv1a_32(const char *key, size_t key_length)
{
uint32_t hash= FNV_32_INIT;
- size_t x= 0;
- for (x= 0; x < key_length; x++)
+ for (size_t x= 0; x < key_length; x++)
{
uint32_t val= (uint32_t)key[x];
hash ^= val;