mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-17 14:46:13 +03:00
Fix the coding style of the pull request #1115
This commit is contained in:
parent
8b3b014062
commit
1539a8c3ef
@ -39,15 +39,14 @@ RemoveWhitespace::RemoveWhitespace(std::string action)
|
|||||||
std::string RemoveWhitespace::evaluate(std::string value,
|
std::string RemoveWhitespace::evaluate(std::string value,
|
||||||
Transaction *transaction) {
|
Transaction *transaction) {
|
||||||
|
|
||||||
long int i = 0;
|
int64_t i = 0;
|
||||||
|
|
||||||
// loop through all the chars
|
// loop through all the chars
|
||||||
while(i < value.size()) {
|
while (i < value.size()) {
|
||||||
// remove whitespaces and non breaking spaces (NBSP)
|
// remove whitespaces and non breaking spaces (NBSP)
|
||||||
if (isspace(value[i])||(value[i] == NBSP)) {
|
if (isspace(value[i]) || (value[i] == NBSP)) {
|
||||||
value.erase(i, 1);
|
value.erase(i, 1);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* if the space is not a whitespace char, increment counter
|
/* if the space is not a whitespace char, increment counter
|
||||||
counter should not be incremented if a character is erased because
|
counter should not be incremented if a character is erased because
|
||||||
the index erased will be replaced by the following character */
|
the index erased will be replaced by the following character */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user