Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/hash/hash_func32_murmur3.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <stddef.h>
#include <stdint.h>
#include <zephyr/toolchain.h>

static inline uint32_t murmur_32_scramble(uint32_t k)
{
Expand All @@ -24,7 +25,7 @@ uint32_t sys_hash32_murmur3(const char *str, size_t n)
const size_t len = n;

for (; n >= sizeof(uint32_t); n -= sizeof(uint32_t), str += sizeof(uint32_t)) {
k = *(const uint32_t *)str;
k = UNALIGNED_GET((const uint32_t *)str);
h ^= murmur_32_scramble(k);
h = (h << 13) | (h >> 19);
h = h * 5 + 0xe6546b64;
Expand Down
Loading