]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
errno-util: suppress LGTM warning about strerror
authorLuca Boccassi <bluca@debian.org>
Wed, 7 Apr 2021 22:06:24 +0000 (23:06 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 8 Apr 2021 12:08:38 +0000 (13:08 +0100)
src/basic/errno-util.h

index 5609820b882f528a0ab756f1e15a4756391e3ab2..3f2d0af56d9524bcda780741a034044f09d57931 100644 (file)
@@ -33,7 +33,7 @@ static inline int negative_errno(void) {
 
 static inline const char *strerror_safe(int error) {
         /* 'safe' here does NOT mean thread safety. */
-        return strerror(abs(error));
+        return strerror(abs(error)); /* lgtm [cpp/potentially-dangerous-function] */
 }
 
 static inline int errno_or_else(int fallback) {