Yura Sokolov <y.sokolov@postgrespro.ru> writes:
> Single round function is written as:
> #define CHECKSUM_COMP(checksum, value) do {\
> uint32 __tmp = (checksum) ^ (value);\
> (checksum) = __tmp * FNV_PRIME ^ (__tmp >> 17);\
> } while (0)
> And looks like it was intended to be
> (checksum) = (__tmp * FNV_PRIME) ^ (__tmp >> 17);
I'm not following your point? Multiplication binds tighter than XOR
in C, see e.g.
https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence
So those sure look equivalent from here.
regards, tom lane