diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-03-18 11:59:53 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-03-18 11:59:53 +0100 |
commit | ca21d59a3fe1f13c852188eae33b7049a7f51b4f (patch) | |
tree | a2a0c191c9ea3906b4ab92fc342ea4b4cce1b928 /coccinelle/strjoina.cocci | |
parent | 57ac6959f53762cf8e1d28289f443ad3572b1e31 (diff) | |
download | systemd-ca21d59a3fe1f13c852188eae33b7049a7f51b4f.tar.gz |
coccinelle: filter out a couple of 'false-positive' transformations
* flag-set.cocci: perform the transformation only if the second
argument is a constant
* sd-journal/lookup3.c: skip the cocci completely for this file, since
it's not "ours"
* strjoina.cocci: skip the transformation on the "test_strjoina" test,
since it intentionally tests the "incorrect" expression we're trying to
transform (the same thing was already done in strjoin.cocci)
Diffstat (limited to 'coccinelle/strjoina.cocci')
-rw-r--r-- | coccinelle/strjoina.cocci | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coccinelle/strjoina.cocci b/coccinelle/strjoina.cocci index a6236eb0f9..b209633480 100644 --- a/coccinelle/strjoina.cocci +++ b/coccinelle/strjoina.cocci @@ -1,6 +1,7 @@ @@ +position p : script:python() { p[0].current_element != "test_strjoina" }; expression n, m; expression list s; @@ -- n = strjoina(m, s, NULL); +- n = strjoina@p(m, s, NULL); + n = strjoina(m, s); |