daandemeyer / rpms / systemd

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