tree-wide: get rid of lgtm annotations

We now use CodeQL, and LGTM itself is gone. Those old annotations are not
useful for anythign now.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-10-11 16:59:00 +02:00
parent f69ae8585f
commit f37508d506
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -98,7 +98,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); /* lgtm [cpp/inconsistent-null-check] */
times = hashmap_get(unit_times_hashmap, *c);
if (times_in_range(times, boot) && times->activated >= service_longest)
service_longest = times->activated;
}
@@ -107,7 +107,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); /* lgtm [cpp/inconsistent-null-check] */
times = hashmap_get(unit_times_hashmap, *c);
if (times_in_range(times, boot) && service_longest - times->activated <= arg_fuzz)
to_print++;
}
@@ -116,7 +116,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); /* lgtm [cpp/inconsistent-null-check] */
times = hashmap_get(unit_times_hashmap, *c);
if (!times_in_range(times, boot) || service_longest - times->activated > arg_fuzz)
continue;
+1 -1
View File
@@ -75,7 +75,7 @@ static inline int RET_NERRNO(int ret) {
static inline const char *strerror_safe(int error) {
/* 'safe' here does NOT mean thread safety. */
return strerror(abs(error)); /* lgtm [cpp/potentially-dangerous-function] */
return strerror(abs(error));
}
static inline int errno_or_else(int fallback) {
+3 -3
View File
@@ -66,7 +66,7 @@ bool in4_addr_is_link_local_dynamic(const struct in_addr *a) {
bool in6_addr_is_link_local(const struct in6_addr *a) {
assert(a);
return IN6_IS_ADDR_LINKLOCAL(a); /* lgtm [cpp/potentially-dangerous-function] */
return IN6_IS_ADDR_LINKLOCAL(a);
}
int in_addr_is_link_local(int family, const union in_addr_union *u) {
@@ -131,7 +131,7 @@ int in_addr_is_localhost(int family, const union in_addr_union *u) {
return in4_addr_is_localhost(&u->in);
if (family == AF_INET6)
return IN6_IS_ADDR_LOOPBACK(&u->in6); /* lgtm [cpp/potentially-dangerous-function] */
return IN6_IS_ADDR_LOOPBACK(&u->in6);
return -EAFNOSUPPORT;
}
@@ -144,7 +144,7 @@ int in_addr_is_localhost_one(int family, const union in_addr_union *u) {
return be32toh(u->in.s_addr) == UINT32_C(0x7F000001);
if (family == AF_INET6)
return IN6_IS_ADDR_LOOPBACK(&u->in6); /* lgtm [cpp/potentially-dangerous-function] */
return IN6_IS_ADDR_LOOPBACK(&u->in6);
return -EAFNOSUPPORT;
}
+1 -1
View File
@@ -67,7 +67,7 @@ static uint64_t scale_progress(uint64_t scale, uint64_t p, uint64_t m) {
* Currently all callers use m >= 1, but we keep the check to be defensive.
*/
if (p >= m || m == 0) // lgtm[cpp/constant-comparison]
if (p >= m || m == 0)
return scale;
return scale * p / m;