]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/in-addr-prefix-util.c
siphash24: introduce siphash24_compress_typesafe() macro
[thirdparty/systemd.git] / src / shared / in-addr-prefix-util.c
index 7c0033d7f9bc8a25bd1954a8c4d0e5a2e8de791c..edccca5a5b97c5e1d600b9d4d02f7b8972b9a69e 100644 (file)
@@ -59,9 +59,9 @@ static void in_addr_prefix_hash_func(const struct in_addr_prefix *a, struct siph
         assert(a);
         assert(state);
 
-        siphash24_compress(&a->family, sizeof(a->family), state);
-        siphash24_compress(&a->prefixlen, sizeof(a->prefixlen), state);
-        siphash24_compress(&a->address, FAMILY_ADDRESS_SIZE(a->family), state);
+        siphash24_compress_typesafe(a->family, state);
+        siphash24_compress_typesafe(a->prefixlen, state);
+        in_addr_hash_func(&a->address, a->family, state);
 }
 
 static int in_addr_prefix_compare_func(const struct in_addr_prefix *x, const struct in_addr_prefix *y) {