]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coccinelle: skip strjoin transformation in test_strjoin()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 4 Oct 2020 10:29:43 +0000 (12:29 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 4 Oct 2020 10:32:21 +0000 (12:32 +0200)
coccinelle/strjoin.cocci

index 675760e37a41b6f8224547105d7768690c5056fd..46f70c4c23682a4d6027b43bc05d9e12c01caa82 100644 (file)
@@ -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);
+)