]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/flags-set.cocci
Merge pull request #17185 from yuwata/ethtool-update
[thirdparty/systemd.git] / coccinelle / flags-set.cocci
1 @@
2 /* Disable this transformation in cases where it doesn't make sense or
3 * where it makes the resulting expression more confusing
4 */
5 position p : script:python() {
6 not (p[0].file == "src/shared/securebits-util.h" or
7 p[0].file == "src/core/manager.h" or
8 p[0].current_element == "log_set_max_level_realm" or
9 p[0].current_element == "unichar_is_valid")
10 };
11 expression x, y;
12 @@
13 (
14 - ((x@p) & (y)) == (y)
15 + FLAGS_SET(x, y)
16 |
17 - (x@p & (y)) == (y)
18 + FLAGS_SET(x, y)
19 |
20 - ((x@p) & y) == y
21 + FLAGS_SET(x, y)
22 )