teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0776-analyze-actually-select-longest-activated-time-of-se.patch

661545
From 91b866591a2fb05a087a040a49a792a3d40a2a06 Mon Sep 17 00:00:00 2001
661545
From: Yu Watanabe <watanabe.yu+github@gmail.com>
661545
Date: Wed, 27 Jun 2018 13:32:05 +0900
661545
Subject: [PATCH] analyze: actually select longest activated-time of services
661545
661545
Discovered by LGTM.
661545
661545
(cherry picked from commit e68131526b7a2cfdb8e59bd2ed7a284dba095ac5)
661545
661545
Resolves: #1694605
661545
---
661545
 src/analyze/analyze.c | 7 ++-----
661545
 1 file changed, 2 insertions(+), 5 deletions(-)
661545
661545
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
661545
index 7116aaa88d..e9ca9ba818 100644
661545
--- a/src/analyze/analyze.c
661545
+++ b/src/analyze/analyze.c
661545
@@ -788,14 +788,11 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned int lev
661545
                 if (times
661545
                     && times->activated
661545
                     && times->activated <= boot->finish_time
661545
-                    && (times->activated >= service_longest
661545
-                        || service_longest == 0)) {
661545
+                    && times->activated >= service_longest)
661545
                         service_longest = times->activated;
661545
-                        break;
661545
-                }
661545
         }
661545
 
661545
-        if (service_longest == 0 )
661545
+        if (service_longest == 0)
661545
                 return r;
661545
 
661545
         STRV_FOREACH(c, deps) {