* 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)
p[0].current_element == "log_set_max_level_realm" or
p[0].current_element == "unichar_is_valid")
};
-expression x, y;
+expression x;
+constant y;
@@
(
- ((x@p) & (y)) == (y)
"src/basic/linux/*"
# Symlinked to test-bus-vtable-cc.cc, which causes issues with the IN_SET macro
"src/libsystemd/sd-bus/test-bus-vtable.c"
+ "src/libsystemd/sd-journal/lookup3.c"
)
top="$(git rev-parse --show-toplevel)"
@@
+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);