Only qemu_create_machine_containers() uses the
machine_containers[] array, restrict the scope
to this single user.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
system/vl.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/system/vl.c b/system/vl.c
index 933ad83a935..58e68b98d87 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2114,17 +2114,15 @@ static void parse_memory_options(void)
loc_pop(&loc);
}
-static const char *const machine_containers[] = {
- "unattached",
- "peripheral",
- "peripheral-anon"
-};
-
static void qemu_create_machine_containers(Object *machine)
{
- int i;
+ static const char *const machine_containers[] = {
+ "unattached",
+ "peripheral",
+ "peripheral-anon"
+ };
- for (i = 0; i < ARRAY_SIZE(machine_containers); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(machine_containers); i++) {
object_property_add_new_container(machine, machine_containers[i]);
}
}
--
2.47.1