]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add missing parenthesis to fxhash
authorAlessio Podda <alessio@isc.org>
Thu, 16 Apr 2026 09:56:46 +0000 (11:56 +0200)
committerAlessio Podda <alessio@isc.org>
Thu, 16 Apr 2026 14:03:40 +0000 (16:03 +0200)
The fxhash implementation had a missing parenthesis that caused it to
diverge from Rust's reference implementation. This commit fixes this.

lib/isc/include/isc/fxhash.h

index 8cfbd323777ab545e084bf4afe0b063c58a86beb..56273f55cba556920aab4957e241d5c90861294d 100644 (file)
@@ -40,7 +40,7 @@
 
 static inline size_t
 fx_add_to_hash(size_t hash, size_t i) {
-       return ISC_ROTATE_LEFT(hash, 5) ^ i * K;
+       return (ISC_ROTATE_LEFT(hash, 5) ^ i) * K;
 }
 
 /*