diff --git a/src/operators/rbl.cc b/src/operators/rbl.cc index 894f9dc8..9190407b 100644 --- a/src/operators/rbl.cc +++ b/src/operators/rbl.cc @@ -228,7 +228,7 @@ bool Rbl::evaluate(Transaction *t, RuleWithActions *rule, // 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 - struct sockaddr *addr = info->ai_addr; // NOSONAR + const struct sockaddr *addr = info->ai_addr; // NOSONAR if (addr->sa_family == AF_INET) { // NOSONAR struct sockaddr_in sin{}; // initialize an empty struct; we don't need port info memcpy(&sin.sin_addr, addr->sa_data + 2, sizeof(sin.sin_addr));