mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 15:06:34 -05:00
Use 64-bit TommyDS hash functions on 64-bit architectures
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-arm32 (push) Has been cancelled
Build / build-win (push) Has been cancelled
Build / build-freebsd (push) Has been cancelled
Build / build-musl (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-arm32 (push) Has been cancelled
Build / build-win (push) Has been cancelled
Build / build-freebsd (push) Has been cancelled
Build / build-musl (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
This commit is contained in:
parent
2dc349fe93
commit
4e6192b625
5 changed files with 42 additions and 18 deletions
|
|
@ -30,9 +30,13 @@ struct snapraid_pool* pool_alloc(const char* dir, const char* name, const char*
|
|||
return pool;
|
||||
}
|
||||
|
||||
static inline tommy_uint32_t pool_hash(const char* file)
|
||||
static inline tommy_hash_t pool_hash(const char* file)
|
||||
{
|
||||
#if TOMMY_SIZE_BIT == 64
|
||||
return tommy_hash_u64(0, file, strlen(file));
|
||||
#else
|
||||
return tommy_hash_u32(0, file, strlen(file));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void pool_free(void* void_pool)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue