Merge pull request #21646 from mrc0mmand/lgtm-followups

LGTM follow-ups
This commit is contained in:
Luca Boccassi
2021-12-07 00:14:45 +00:00
committed by GitHub
3 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -982,7 +982,7 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned level,
return r;
STRV_FOREACH(c, deps) {
times = hashmap_get(unit_times_hashmap, *c);
times = hashmap_get(unit_times_hashmap, *c); /* lgtm [cpp/inconsistent-null-check] */
if (times_in_range(times, boot) && times->activated >= service_longest)
service_longest = times->activated;
}
@@ -991,7 +991,7 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned level,
return r;
STRV_FOREACH(c, deps) {
times = hashmap_get(unit_times_hashmap, *c);
times = hashmap_get(unit_times_hashmap, *c); /* lgtm [cpp/inconsistent-null-check] */
if (times_in_range(times, boot) && service_longest - times->activated <= arg_fuzz)
to_print++;
}
@@ -1000,7 +1000,7 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned level,
return r;
STRV_FOREACH(c, deps) {
times = hashmap_get(unit_times_hashmap, *c);
times = hashmap_get(unit_times_hashmap, *c); /* lgtm [cpp/inconsistent-null-check] */
if (!times_in_range(times, boot) || service_longest - times->activated > arg_fuzz)
continue;
+1
View File
@@ -148,6 +148,7 @@ static int target_serialize(Unit *u, FILE *f, FDSet *fds) {
static int target_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) {
Target *s = TARGET(u);
assert(s);
assert(u);
assert(key);
assert(value);
+1 -1
View File
@@ -170,7 +170,7 @@ int dns_answer_add(
/* Entry already exists, keep the entry with the higher TTL. */
if (rr->ttl > exist->rr->ttl) {
dns_resource_record_unref(exist->rr);
exist->rr = dns_resource_record_ref(rr);
exist->rr = dns_resource_record_ref(rr); /* lgtm [cpp/inconsistent-null-check] */
/* Update RRSIG and RR at the same time */
if (rrsig) {