From affaed1e55685e8e248db1afd50b3e0f466ce5cc Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 27 Jun 2018 13:28:28 +0900 Subject: [PATCH 1/2] sd-bus: fix implicit downcast of bitfield reported by LGTM --- src/libsystemd/sd-bus/bus-introspect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-bus/bus-introspect.c b/src/libsystemd/sd-bus/bus-introspect.c index cfcbd8b072f..582e723e2e0 100644 --- a/src/libsystemd/sd-bus/bus-introspect.c +++ b/src/libsystemd/sd-bus/bus-introspect.c @@ -63,7 +63,7 @@ int introspect_write_child_nodes(struct introspect *i, Set *s, const char *prefi return 0; } -static void introspect_write_flags(struct introspect *i, int type, int flags) { +static void introspect_write_flags(struct introspect *i, int type, uint64_t flags) { if (flags & SD_BUS_VTABLE_DEPRECATED) fputs(" \n", i->f); From e68131526b7a2cfdb8e59bd2ed7a284dba095ac5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 27 Jun 2018 13:32:05 +0900 Subject: [PATCH 2/2] analyze: actually select longest activated-time of services Discovered by LGTM. --- src/analyze/analyze.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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)