summaryrefslogtreecommitdiff
path: root/coccinelle/const-strlen.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle/const-strlen.cocci')
-rw-r--r--coccinelle/const-strlen.cocci4
1 files changed, 4 insertions, 0 deletions
diff --git a/coccinelle/const-strlen.cocci b/coccinelle/const-strlen.cocci
index 38bf9b118f..30a6e5a88e 100644
--- a/coccinelle/const-strlen.cocci
+++ b/coccinelle/const-strlen.cocci
@@ -1,8 +1,12 @@
@@
constant s;
@@
+(
+#define STRLEN
+&
- sizeof(s)-1
+ STRLEN(s)
+)
@@
constant s;
@@