summaryrefslogtreecommitdiff
path: root/coccinelle/strjoin.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle/strjoin.cocci')
-rw-r--r--coccinelle/strjoin.cocci19
1 files changed, 9 insertions, 10 deletions
diff --git a/coccinelle/strjoin.cocci b/coccinelle/strjoin.cocci
index 675760e37a..46f70c4c23 100644
--- a/coccinelle/strjoin.cocci
+++ b/coccinelle/strjoin.cocci
@@ -1,16 +1,15 @@
@@
-expression list args;
-@@
-- strjoin(args, NULL);
-+ strjoin(args);
-@@
+position p : script:python() { p[0].current_element != "test_strjoin" };
expression t;
expression list args;
@@
-- t = strjoin(args, NULL);
+(
+- strjoin@p(args, NULL);
++ strjoin(args);
+|
+- t = strjoin@p(args, NULL);
+ t = strjoin(args);
-@@
-expression list args;
-@@
-- return strjoin(args, NULL);
+|
+- return strjoin@p(args, NULL);
+ return strjoin(args);
+)