summaryrefslogtreecommitdiff
path: root/src/analyze
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-06-27 13:32:05 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-27 14:54:19 +0900
commite68131526b7a2cfdb8e59bd2ed7a284dba095ac5 (patch)
tree0c24cf94c719331a1ce71fb1dda2d52a56966fbe /src/analyze
parentaffaed1e55685e8e248db1afd50b3e0f466ce5cc (diff)
downloadsystemd-e68131526b7a2cfdb8e59bd2ed7a284dba095ac5.tar.gz
analyze: actually select longest activated-time of services
Discovered by LGTM.
Diffstat (limited to 'src/analyze')
-rw-r--r--src/analyze/analyze.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index de0fe6eba8..6ea4de1f29 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -890,11 +890,8 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned int lev
STRV_FOREACH(c, deps) {
times = hashmap_get(unit_times_hashmap, *c);
if (times_in_range(times, boot) &&
- (times->activated >= service_longest
- || service_longest == 0)) {
+ times->activated >= service_longest)
service_longest = times->activated;
- break;
- }
}
if (service_longest == 0)