From: Yu Watanabe Date: Wed, 27 Jun 2018 04:32:05 +0000 (+0900) Subject: analyze: actually select longest activated-time of services X-Git-Tag: v240~1032^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9438%2Fhead;p=thirdparty%2Fsystemd.git analyze: actually select longest activated-time of services Discovered by LGTM. --- diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index de0fe6eba81..6ea4de1f293 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)