]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze,resolve: suppress a couple of false-positive alerts 21646/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 6 Dec 2021 16:45:37 +0000 (17:45 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 6 Dec 2021 16:45:37 +0000 (17:45 +0100)
src/analyze/analyze.c
src/resolve/resolved-dns-answer.c

index 2293fcea6a4b0a3b10a66d94e81da0694ee65280..b3e00581ed3236ee28a5c7696a5cfc78f8a002b5 100644 (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;
 
index 978d14818ab63ebbf5fafdb3352e4430085820cc..479af69d0fce7a0f54f3006d5609fa7b31e343f6 100644 (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) {