mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Add extra SonarCloud supression msg; Change type to auto
This commit is contained in:
parent
9fea1ca454
commit
e879711d87
@ -230,8 +230,9 @@ bool Rbl::evaluate(Transaction *t, RuleWithActions *rule,
|
|||||||
// SonarCloud suggested to use the init-statement to declare "addr" inside the if statement.
|
// SonarCloud suggested to use the init-statement to declare "addr" inside the if statement.
|
||||||
// I think that's not good here, because we need that in the else block
|
// I think that's not good here, because we need that in the else block
|
||||||
struct sockaddr *addr = info->ai_addr;
|
struct sockaddr *addr = info->ai_addr;
|
||||||
|
// NOSONAR
|
||||||
if (addr->sa_family == AF_INET) { // only IPv4 address is allowed
|
if (addr->sa_family == AF_INET) { // only IPv4 address is allowed
|
||||||
struct sockaddr_in *sin = (struct sockaddr_in *) addr; // cppcheck-suppress[dangerousTypeCast]
|
auto sin = (struct sockaddr_in *) addr; // cppcheck-suppress[dangerousTypeCast]
|
||||||
furtherInfo(sin, ipStr, t, m_provider);
|
furtherInfo(sin, ipStr, t, m_provider);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user