mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
lgtm: warn about strerror() use
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
9f717d42cb
commit
9ff46eded2
@@ -38,6 +38,9 @@ predicate potentiallyDangerousFunction(Function f, string message) {
|
||||
) or (
|
||||
f.getQualifiedName() = "ntohs" and
|
||||
message = "Call to ntohs() is confusing. Use be16toh() instead."
|
||||
) or (
|
||||
f.getQualifiedName() = "strerror" and
|
||||
message = "Call to strerror() is not thread-safe. Use strerror_r() or printf()'s %m format string instead."
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user