Skip to content

Commit 1286f15

Browse files
aescolarkartben
authored andcommitted
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>
1 parent e32b98c commit 1286f15

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

boards/native/common/extra_args/extra_args.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
static void remove_one_char(char *str)
1616
{
17-
int i;
18-
19-
for (i = 0; str[i] != 0; i++) {
17+
for (int i = 0; str[i] != 0; i++) {
2018
str[i] = str[i+1];
2119
}
2220
}

0 commit comments

Comments
 (0)