boards native: Move int declaration into loop

To reduce its scope and please static analyzers

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2025-05-12 15:06:23 +02:00 committed by Benjamin Cabé
commit 1286f15543

View file

@ -14,9 +14,7 @@
static void remove_one_char(char *str)
{
int i;
for (i = 0; str[i] != 0; i++) {
for (int i = 0; str[i] != 0; i++) {
str[i] = str[i+1];
}
}