summaryrefslogtreecommitdiff
path: root/src/shared/condition.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-20 15:36:20 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-04 11:50:44 +0200
commitd94a24ca2ea769755beaed0659b966b1ec75c8d4 (patch)
treee809995a39930fbc317fecc96e403c13f76737f0 /src/shared/condition.c
parent00bfe67f6b178056bffcfa9fbfb04ca3fa809989 (diff)
downloadsystemd-d94a24ca2ea769755beaed0659b966b1ec75c8d4.tar.gz
systemd-d94a24ca2ea769755beaed0659b966b1ec75c8d4.tar.bz2
systemd-d94a24ca2ea769755beaed0659b966b1ec75c8d4.zip
Add macro for checking if some flags are set
This way we don't need to repeat the argument twice. I didn't replace all instances. I think it's better to leave out: - asserts - comparisons like x & y == x, which are mathematically equivalent, but here we aren't checking if flags are set, but if the argument fits in the flags.
Diffstat (limited to 'src/shared/condition.c')
-rw-r--r--src/shared/condition.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/condition.c b/src/shared/condition.c
index bf6476c339..a41a782664 100644
--- a/src/shared/condition.c
+++ b/src/shared/condition.c
@@ -251,7 +251,7 @@ static int condition_test_control_group_controller(Condition *c) {
return 1;
}
- return (system_mask & wanted_mask) == wanted_mask;
+ return FLAGS_SET(system_mask, wanted_mask);
}
static int condition_test_group(Condition *c) {