Skip to content

Commit e879711

Browse files
committed
Add extra SonarCloud supression msg; Change type to auto
1 parent 9fea1ca commit e879711

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/operators/rbl.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,9 @@ bool Rbl::evaluate(Transaction *t, RuleWithActions *rule,
230230
// SonarCloud suggested to use the init-statement to declare "addr" inside the if statement.
231231
// I think that's not good here, because we need that in the else block
232232
struct sockaddr *addr = info->ai_addr;
233+
// NOSONAR
233234
if (addr->sa_family == AF_INET) { // only IPv4 address is allowed
234-
struct sockaddr_in *sin = (struct sockaddr_in *) addr; // cppcheck-suppress[dangerousTypeCast]
235+
auto sin = (struct sockaddr_in *) addr; // cppcheck-suppress[dangerousTypeCast]
235236
furtherInfo(sin, ipStr, t, m_provider);
236237
}
237238
else {

0 commit comments

Comments
 (0)