]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: simplify manager_recheck_journal() a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Feb 2018 14:08:18 +0000 (15:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 12 Feb 2018 10:34:00 +0000 (11:34 +0100)
No need for an if check if we just pass along a bool anyway.

src/core/manager.c

index 9c68eb49d1906ab824121122deb6e65a72d345b0..e83a0dd5e6e7b7f763b7bc294c66f52a957e0bb5 100644 (file)
@@ -3601,16 +3601,10 @@ void manager_recheck_journal(Manager *m) {
         if (getpid_cached() != 1)
                 return;
 
-        if (manager_journal_is_running(m)) {
-
-                /* The journal is fully and entirely up? If so, let's permit logging to it, if that's configured. */
-                log_set_prohibit_ipc(false);
-        } else {
-
-                /* If the journal is down, don't ever log to it, otherwise we might end up deadlocking ourselves as we
-                 * might trigger an activation ourselves we can't fulfill */
-                log_set_prohibit_ipc(true);
-        }
+        /* The journal is fully and entirely up? If so, let's permit logging to it, if that's configured. If the
+         * journal is down, don't ever log to it, otherwise we might end up deadlocking ourselves as we might trigger
+         * an activation ourselves we can't fulfill. */
+        log_set_prohibit_ipc(!manager_journal_is_running(m));
         log_open();
 }