mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +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 commitb146a7345b
) (cherry picked from commit228cd82d2c
)
This commit is contained in:
parent
33fb3a9d0d
commit
5ede3388c5
@ -4812,12 +4812,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user