mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Cosmetics: Having cppcheck pleased
(...) remove_comments.cc,62,style,knownConditionTrueFalse,Condition 'incomment==0' is always true (...) remove_comments.cc,66,style,knownConditionTrueFalse,Condition 'incomment==0' is always true (...) remove_comments.cc,69,style,knownConditionTrueFalse,Condition 'incomment==0' is always true
This commit is contained in:
parent
66ba7b065a
commit
6fdba42c02
@ -59,14 +59,14 @@ std::string RemoveComments::evaluate(const std::string &value,
|
|||||||
} else if ((input[i] == '<') && (i + 1 < input_len)
|
} else if ((input[i] == '<') && (i + 1 < input_len)
|
||||||
&& (input[i + 1] == '!') && (i + 2 < input_len)
|
&& (input[i + 1] == '!') && (i + 2 < input_len)
|
||||||
&& (input[i+2] == '-') && (i + 3 < input_len)
|
&& (input[i+2] == '-') && (i + 3 < input_len)
|
||||||
&& (input[i + 3] == '-') && (incomment == 0)) {
|
&& (input[i + 3] == '-')) {
|
||||||
incomment = 1;
|
incomment = 1;
|
||||||
i += 4;
|
i += 4;
|
||||||
} else if ((input[i] == '-') && (i + 1 < input_len)
|
} else if ((input[i] == '-') && (i + 1 < input_len)
|
||||||
&& (input[i + 1] == '-') && (incomment == 0)) {
|
&& (input[i + 1] == '-')) {
|
||||||
input[i] = ' ';
|
input[i] = ' ';
|
||||||
break;
|
break;
|
||||||
} else if (input[i] == '#' && (incomment == 0)) {
|
} else if (input[i] == '#') {
|
||||||
input[i] = ' ';
|
input[i] = ' ';
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user