summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-14 19:02:29 +0100
committerGitHub <noreply@github.com>2017-12-14 19:02:29 +0100
commitfbd0b64f44a7bae678137d67ad5da202f6b8d809 (patch)
tree0402dca4e258583e009d07c0d8eb9c0fad19d5ac /coccinelle
parent1142cbd76a1db2adb2c382b76fc0a1c5a97c70cc (diff)
tree-wide: make use of new STRLEN() macro everywhere (#7639)
Let's employ coccinelle to do this for us. Follow-up for #7625.
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/const-strlen.cocci10
1 files changed, 10 insertions, 0 deletions
diff --git a/coccinelle/const-strlen.cocci b/coccinelle/const-strlen.cocci
new file mode 100644
index 0000000000..38bf9b118f
--- /dev/null
+++ b/coccinelle/const-strlen.cocci
@@ -0,0 +1,10 @@
+@@
+constant s;
+@@
+- sizeof(s)-1
++ STRLEN(s)
+@@
+constant s;
+@@
+- strlen(s)
++ STRLEN(s)