Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 62cb73f

Browse files
committed
Add const modifier to variable
1 parent 8b3269f commit 62cb73f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/operators/rbl.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ bool Rbl::evaluate(Transaction *t, RuleWithActions *rule,
228228

229229
// SonarCloud suggested to use the init-statement to declare "addr" inside the if statement.
230230
// I think that's not good here, because we need that in the else block
231-
struct sockaddr *addr = info->ai_addr; // NOSONAR
231+
conststruct sockaddr *addr = info->ai_addr; // NOSONAR
232232
if (addr->sa_family == AF_INET) { // NOSONAR
233233
struct sockaddr_in sin{}; // initialize an empty struct; we don't need port info
234234
memcpy(&sin.sin_addr, addr->sa_data + 2, sizeof(sin.sin_addr));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /