From: Zbigniew Jędrzejewski-Szmek Date: Fri, 14 Oct 2022 12:40:24 +0000 (+0200) Subject: manager: reformat boolean expression in unit_is_pristine() X-Git-Tag: v252-rc2~2^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b146a7345b69de16e88347acadb3783ffeeaad9d;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/unit.c b/src/core/unit.c index d6bea2080f0..5016114cb47 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) {