1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

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.

(cherry picked from commit b146a7345b)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-10-14 14:40:24 +02:00
parent 06dc900efa
commit 228cd82d2c

View File

@ -4830,12 +4830,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) {