mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
src/utils/acmp.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce the scope of a variable in a for loop
This commit is contained in:
parent
7fed599fdb
commit
2daebc090f
@ -190,10 +190,9 @@ static size_t acmp_strlen(ACMP *parser, const char *str) {
|
|||||||
* len - length of input string
|
* len - length of input string
|
||||||
*/
|
*/
|
||||||
static void acmp_strtoucs(ACMP *parser, const char *str, long *ucs_chars, int len) {
|
static void acmp_strtoucs(ACMP *parser, const char *str, long *ucs_chars, int len) {
|
||||||
int i;
|
|
||||||
const char *c = str;
|
const char *c = str;
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (int i = 0;i < len;i++) {
|
||||||
*(ucs_chars++) = *(c++);
|
*(ucs_chars++) = *(c++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user