From 135a9868a7551fba29a928f7a8dd9761486f9a5b Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Sun, 4 Oct 2020 12:29:43 +0200 Subject: [PATCH] coccinelle: skip strjoin transformation in test_strjoin() --- coccinelle/strjoin.cocci | 19 +++++++++---------- 1 file 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); +)