summaryrefslogtreecommitdiffstats
path: root/coccinelle
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-12-24 09:51:30 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-12-25 07:38:59 +0100
commitc01a5c0527b7c49d4b10f5d525de060feb2b37f2 (patch)
tree9831d585e249cbcb21ccb24194e93e48dfff3aab /coccinelle
parentresolve: don't add sockets to the graveyard on shutdown (diff)
downloadsystemd-c01a5c0527b7c49d4b10f5d525de060feb2b37f2.tar.xz
systemd-c01a5c0527b7c49d4b10f5d525de060feb2b37f2.zip
siphash24: introduce siphash24_compress_typesafe() macro
To prevent copy-and-paste mistake. This also introduce in_addr_hash_func(). No functional change, just refactoring.
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/siphash24.cocci6
1 files changed, 6 insertions, 0 deletions
diff --git a/coccinelle/siphash24.cocci b/coccinelle/siphash24.cocci
new file mode 100644
index 0000000000..a9afd90aa6
--- /dev/null
+++ b/coccinelle/siphash24.cocci
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+@@
+expression p, s;
+@@
+- siphash24_compress(&p, sizeof(p), s);
++ siphash24_compress_typesafe(p, s);