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:
Elia Pinto 2024-02-21 13:50:51 +01:00
parent 7fed599fdb
commit 2daebc090f

View File

@ -190,10 +190,9 @@ static size_t acmp_strlen(ACMP *parser, const char *str) {
* len - length of input string
*/
static void acmp_strtoucs(ACMP *parser, const char *str, long *ucs_chars, int len) {
int i;
const char *c = str;
for (i = 0; i < len; i++) {
for (int i = 0;i < len;i++) {
*(ucs_chars++) = *(c++);
}
}