diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-22 22:56:40 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-22 22:56:40 +0200 |
commit | ae7b78426908e77f19cc34d5e096103141d08969 (patch) | |
tree | e619d18fc0f8d044bf019898c9d76f486967c4f3 | |
parent | 72036eff02d70100dd5a1caeae6887a4e253348f (diff) |
Don’t assume that uints are 64 bits
-rw-r--r-- | src/strview.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/strview.c b/src/strview.c index 70e78f0..3ed9274 100644 --- a/src/strview.c +++ b/src/strview.c @@ -1,3 +1,4 @@ +#include <inttypes.h> #include <string.h> #include "common.h" @@ -10,7 +11,7 @@ strview_hash(strview_t sv) uint64_t h = 0x100; for (size_t i = 0; likely(i < sv.len); i++) { h ^= sv.p[i]; - h *= 1111111111111111111u; + h *= UINT64_C(1111111111111111111); } return h; } |