From b146a7345b69de16e88347acadb3783ffeeaad9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 14 Oct 2022 14:40:24 +0200
Subject: [PATCH] manager: reformat boolean expression in unit_is_pristine()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Not not IN_SET(…) is just too much for my poor brain. Let's invert
the expression to make it easier to undertand.
---
 src/core/unit.c | 12 ++++++------
 1 file 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) {
-- 
2.33.0

