summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-20 15:36:20 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit91fc9294277db3702d72083279f20c4a10acff02 (patch)
tree133e33f3789856c175a9425d02159cc78827cc40 /src/core
parent370e2cb260e7d8d063e00f6917e76952131ec741 (diff)
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/core')
-rw-r--r--src/core/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 1c8245e0b..bc2af6944 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1304,7 +1304,7 @@ const char *unit_get_realized_cgroup_path(Unit *u, CGroupMask mask) {
if (u->cgroup_path &&
u->cgroup_realized &&
- (u->cgroup_realized_mask & mask) == mask)
+ FLAGS_SET(u->cgroup_realized_mask, mask))
return u->cgroup_path;
u = UNIT_DEREF(u->slice);