diff options
Diffstat (limited to 'hw/acpi/cpu.c')
-rw-r--r-- | hw/acpi/cpu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 6350caa765..e2317be546 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -44,14 +44,11 @@ static ACPIOSTInfo *acpi_cpu_device_status(int idx, AcpiCpuStatus *cdev) void acpi_cpu_ospm_status(CPUHotplugState *cpu_st, ACPIOSTInfoList ***list) { + ACPIOSTInfoList ***tail = list; int i; for (i = 0; i < cpu_st->dev_count; i++) { - ACPIOSTInfoList *elem = g_new0(ACPIOSTInfoList, 1); - elem->value = acpi_cpu_device_status(i, &cpu_st->devs[i]); - elem->next = NULL; - **list = elem; - *list = &elem->next; + QAPI_LIST_APPEND(*tail, acpi_cpu_device_status(i, &cpu_st->devs[i])); } } |