]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
in-addr-util: suppress LGTM warning about htobe32 19243/head
authorLuca Boccassi <bluca@debian.org>
Wed, 7 Apr 2021 22:08:34 +0000 (23:08 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 8 Apr 2021 12:08:38 +0000 (13:08 +0100)
We are not calling it directly, it's coming from a standard library
macro, so just suppress it.

src/basic/in-addr-util.c

index f7a7252f1af4d5f9e0722b0c424d6299b8279e8f..c11e6ceb9065c2c79fb2dae6d1162d6ae7274c0f 100644 (file)
@@ -51,7 +51,7 @@ bool in4_addr_is_link_local(const struct in_addr *a) {
 bool in6_addr_is_link_local(const struct in6_addr *a) {
         assert(a);
 
-        return IN6_IS_ADDR_LINKLOCAL(a);
+        return IN6_IS_ADDR_LINKLOCAL(a); /* lgtm [cpp/potentially-dangerous-function] */
 }
 
 int in_addr_is_link_local(int family, const union in_addr_union *u) {
@@ -116,7 +116,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);
+                return IN6_IS_ADDR_LOOPBACK(&u->in6); /* lgtm [cpp/potentially-dangerous-function] */
 
         return -EAFNOSUPPORT;
 }