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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-10-14 15:13:57 +02:00
parent 52bcf45a6c
commit b146a7345b
+6 -6
View File
@@ -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) {