diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-04-20 15:36:20 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-04 11:50:44 +0200 |
commit | d94a24ca2ea769755beaed0659b966b1ec75c8d4 (patch) | |
tree | e809995a39930fbc317fecc96e403c13f76737f0 /src/basic/process-util.c | |
parent | 00bfe67f6b178056bffcfa9fbfb04ca3fa809989 (diff) | |
download | systemd-d94a24ca2ea769755beaed0659b966b1ec75c8d4.tar.gz |
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/basic/process-util.c')
-rw-r--r-- | src/basic/process-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c index e3be7b9793..61ab181e6f 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1359,7 +1359,7 @@ int safe_fork_full( } } - if ((flags & (FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE)) == (FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE)) { + if (FLAGS_SET(flags, FORK_NEW_MOUNTNS | FORK_MOUNTNS_SLAVE)) { /* Optionally, make sure we never propagate mounts to the host. */ |