mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-02 21:00:16 -05:00
Use a 32 bit seed for tommy_strhash_u32
The previous 64 bit high part was anyway ignored.
This commit is contained in:
parent
a652eedb3c
commit
f4f386983a
2 changed files with 2 additions and 2 deletions
|
|
@ -165,7 +165,7 @@ tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tom
|
||||||
return c + ((tommy_uint64_t)b << 32);
|
return c + ((tommy_uint64_t)b << 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key)
|
tommy_uint32_t tommy_strhash_u32(tommy_uint32_t init_val, const void* void_key)
|
||||||
{
|
{
|
||||||
const unsigned char* key = tommy_cast(const unsigned char*, void_key);
|
const unsigned char* key = tommy_cast(const unsigned char*, void_key);
|
||||||
tommy_uint32_t a, b, c;
|
tommy_uint32_t a, b, c;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tom
|
||||||
* This function is endianness independent.
|
* This function is endianness independent.
|
||||||
* \return The hash value of 32 bits.
|
* \return The hash value of 32 bits.
|
||||||
*/
|
*/
|
||||||
tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key);
|
tommy_uint32_t tommy_strhash_u32(tommy_uint32_t init_val, const void* void_key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integer reversible hash function for 32 bits.
|
* Integer reversible hash function for 32 bits.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue