siphash24: introduce siphash24_compress_typesafe() macro

To prevent copy-and-paste mistake.

This also introduce in_addr_hash_func().

No functional change, just refactoring.
This commit is contained in:
Yu Watanabe
2023-12-25 15:38:59 +09:00
parent ac1b7b9e19
commit c01a5c0527
38 changed files with 177 additions and 162 deletions
+1 -1
View File
@@ -303,7 +303,7 @@ bool pidref_is_self(const PidRef *pidref) {
}
static void pidref_hash_func(const PidRef *pidref, struct siphash *state) {
siphash24_compress(&pidref->pid, sizeof(pidref->pid), state);
siphash24_compress_typesafe(pidref->pid, state);
}
static int pidref_compare_func(const PidRef *a, const PidRef *b) {