valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0777-pid1-remove-unnecessary-error-reassignment.patch

661545
From f1851da2600d24191d90cfa2474574821c240969 Mon Sep 17 00:00:00 2001
661545
From: Frantisek Sumsal <fsumsal@redhat.com>
661545
Date: Wed, 27 Feb 2019 18:11:44 +0100
661545
Subject: [PATCH] pid1: remove unnecessary error reassignment
661545
661545
r is always >= 0 so let's drop the unnecessary condition
661545
to make LGTM happy
661545
661545
Based on commit 7c3733d5defb5428ddfeefae6d80fcbcc253e7ef
661545
661545
Resolves: #1694605
661545
---
661545
 src/core/manager.c | 4 +---
661545
 1 file changed, 1 insertion(+), 3 deletions(-)
661545
661545
diff --git a/src/core/manager.c b/src/core/manager.c
661545
index afa4d2b8fa..88d156e8fb 100644
661545
--- a/src/core/manager.c
661545
+++ b/src/core/manager.c
661545
@@ -2805,9 +2805,7 @@ int manager_reload(Manager *m) {
661545
         lookup_paths_free(&m->lookup_paths);
661545
 
661545
         /* Find new unit paths */
661545
-        q = manager_run_generators(m);
661545
-        if (q < 0 && r >= 0)
661545
-                r = q;
661545
+        r = manager_run_generators(m);
661545
 
661545
         q = lookup_paths_init(
661545
                         &m->lookup_paths, m->running_as, true,