mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
system: Inline machine_containers[] in qemu_create_machine_containers()
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> Acked-by: Peter Xu <peterx@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250102211800.79235-9-philmd@linaro.org>
This commit is contained in:
+7
-9
@@ -2113,18 +2113,16 @@ 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 containers[] = {
|
||||
"unattached",
|
||||
"peripheral",
|
||||
"peripheral-anon",
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(machine_containers); i++) {
|
||||
object_property_add_new_container(machine, machine_containers[i]);
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(containers); i++) {
|
||||
object_property_add_new_container(machine, containers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user