summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/strjoin.cocci16
1 files changed, 16 insertions, 0 deletions
diff --git a/coccinelle/strjoin.cocci b/coccinelle/strjoin.cocci
new file mode 100644
index 0000000000..675760e37a
--- /dev/null
+++ b/coccinelle/strjoin.cocci
@@ -0,0 +1,16 @@
+@@
+expression list args;
+@@
+- strjoin(args, NULL);
++ strjoin(args);
+@@
+expression t;
+expression list args;
+@@
+- t = strjoin(args, NULL);
++ t = strjoin(args);
+@@
+expression list args;
+@@
+- return strjoin(args, NULL);
++ return strjoin(args);