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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user