daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
661545
From 443a7bc554b65f9b859db60474439c03b19c79c1 Mon Sep 17 00:00:00 2001
661545
From: Frantisek Sumsal <fsumsal@redhat.com>
661545
Date: Wed, 27 Feb 2019 18:35:15 +0100
661545
Subject: [PATCH] core: drop unnecessary condition
661545
661545
In this case ret is always >= 0 as it still contains the initialization
661545
value (i.e. 0). Let's drop the unnecessary condition to make LGTM happy.
661545
661545
Relevant commit: efdb02375beb0a940c3320865572913780b4d7de
661545
661545
Resolves: #1694605
661545
---
661545
 src/core/unit.c | 2 +-
661545
 1 file changed, 1 insertion(+), 1 deletion(-)
661545
661545
diff --git a/src/core/unit.c b/src/core/unit.c
661545
index cdac192eb6..4069a6f4c4 100644
661545
--- a/src/core/unit.c
661545
+++ b/src/core/unit.c
661545
@@ -2054,7 +2054,7 @@ static int unit_watch_pids_in_path(Unit *u, const char *path) {
661545
                 if (r < 0 && ret >= 0)
661545
                         ret = r;
661545
 
661545
-        } else if (ret >= 0)
661545
+        } else
661545
                 ret = r;
661545
 
661545
         r = cg_enumerate_subgroups(SYSTEMD_CGROUP_CONTROLLER, path, &d);