summaryrefslogtreecommitdiffstats
path: root/zix/digest.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-13 17:25:57 +0200
committerDavid Robillard <d@drobilla.net>2020-08-13 17:25:57 +0200
commitfc253203d7aa52d866e21576215de6c40c45f9c4 (patch)
treee06c737e09c771eb47dea34b7cb5c55c412c5934 /zix/digest.c
parentea0fd7ddc5086a553e7a94b16b46700af476f3dd (diff)
downloadzix-fc253203d7aa52d866e21576215de6c40c45f9c4.tar.gz
zix-fc253203d7aa52d866e21576215de6c40c45f9c4.tar.bz2
zix-fc253203d7aa52d866e21576215de6c40c45f9c4.zip
Fix signed operands of bitwise operators
Diffstat (limited to 'zix/digest.c')
-rw-r--r--zix/digest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zix/digest.c b/zix/digest.c
index 7d9c035..d6ceb0e 100644
--- a/zix/digest.c
+++ b/zix/digest.c
@@ -50,7 +50,7 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
#else
// Classic DJB hash
for (size_t i = 0; i < len; ++i) {
- hash = (hash << 5) + hash + str[i];
+ hash = (hash << 5u) + hash + str[i];
}
#endif
return hash;