diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-10-14 14:40:24 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-10-14 15:13:57 +0200 |
commit | b146a7345b69de16e88347acadb3783ffeeaad9d (patch) | |
tree | c9d61ecf519057a559dc9d9c38460a8d64841a8e | |
parent | 52bcf45a6c2b25e58b0a798b0cdc3c4d0d5cc961 (diff) | |
download | systemd-b146a7345b69de16e88347acadb3783ffeeaad9d.tar.gz |
manager: reformat boolean expression in unit_is_pristine()
Not not IN_SET(…) is just too much for my poor brain. Let's invert
the expression to make it easier to undertand.
-rw-r--r-- | src/core/unit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index d6bea2080f..5016114cb4 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -4850,12 +4850,12 @@ bool unit_is_pristine(Unit *u) { * are marked UNIT_LOADED even though nothing was actually * loaded, as those unit types don't require a file on disk. */ - return !(!IN_SET(u->load_state, UNIT_NOT_FOUND, UNIT_LOADED) || - u->fragment_path || - u->source_path || - !strv_isempty(u->dropin_paths) || - u->job || - u->merged_into); + return IN_SET(u->load_state, UNIT_NOT_FOUND, UNIT_LOADED) && + !u->fragment_path && + !u->source_path && + strv_isempty(u->dropin_paths) && + !u->job && + !u->merged_into; } pid_t unit_control_pid(Unit *u) { |