]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/flags-set.cocci
Merge pull request #18990 from yuwata/network-dhcpv6-use-domains
[thirdparty/systemd.git] / coccinelle / flags-set.cocci
CommitLineData
d94a24ca 1@@
aad54dbc
FS
2/* Disable this transformation in cases where it doesn't make sense or
3 * where it makes the resulting expression more confusing
4 */
5position 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 };
ca21d59a
FS
11expression x;
12constant y;
d94a24ca 13@@
ccd52940
FS
14(
15- ((x@p) & (y)) == (y)
d94a24ca 16+ FLAGS_SET(x, y)
ccd52940
FS
17|
18- (x@p & (y)) == (y)
d94a24ca 19+ FLAGS_SET(x, y)
ccd52940
FS
20|
21- ((x@p) & y) == y
d94a24ca 22+ FLAGS_SET(x, y)
ccd52940 23)