mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/sysbus: Use sizeof(BusState) in main_system_bus_create()
Rather than using the obscure system_bus_info.instance_size, directly use sizeof(BusState). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alexander Graf <graf@amazon.com> Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@eviden.com> Message-Id: <20250125181343.59151-2-philmd@linaro.org>
This commit is contained in:
parent
0d2d00e57a
commit
d4194e19cc
1 changed files with 2 additions and 2 deletions
|
@ -323,8 +323,8 @@ static void main_system_bus_create(void)
|
|||
* assign main_system_bus before qbus_init()
|
||||
* in order to make "if (bus != sysbus_get_default())" work
|
||||
*/
|
||||
main_system_bus = g_malloc0(system_bus_info.instance_size);
|
||||
qbus_init(main_system_bus, system_bus_info.instance_size,
|
||||
main_system_bus = g_new0(BusState, 1);
|
||||
qbus_init(main_system_bus, sizeof(BusState),
|
||||
TYPE_SYSTEM_BUS, NULL, "main-system-bus");
|
||||
OBJECT(main_system_bus)->free = g_free;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue