From 4271a5aeef683c5b3d8c7967064e0ec90a5411dc Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 23 Feb 2009 09:32:11 +0000 Subject: [PATCH] [PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots Some instances were cast and others were not. This patch makes all instances not cast opaque into PHPSlots. Also consistently use hotplug_slots as the variable to which opaque is assigned. Signed-off-by: Simon Horman --- hw/piix4acpi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/piix4acpi.c b/hw/piix4acpi.c index 4e392078..91672ca8 100644 --- a/hw/piix4acpi.c +++ b/hw/piix4acpi.c @@ -279,24 +279,24 @@ static void acpi_php_writeb(void *opaque, uint32_t addr, uint32_t val) static void pcislots_save(QEMUFile* f, void* opaque) { - PHPSlots *s = (PHPSlots*)opaque; + PHPSlots *hotplug_slots = opaque; int i; for ( i = 0; i < ACPI_PHP_SLOT_NUM; i++ ) { - qemu_put_8s( f, &s->status[i]); + qemu_put_8s( f, &hotplug_slots->status[i]); } - qemu_put_8s(f, &s->plug_evt); + qemu_put_8s(f, &hotplug_slots->plug_evt); } static int pcislots_load(QEMUFile* f, void* opaque, int version_id) { - PHPSlots *s = (PHPSlots*)opaque; + PHPSlots *hotplug_slots = opaque; int i; if (version_id != 1) return -EINVAL; for ( i = 0; i < ACPI_PHP_SLOT_NUM; i++ ) { - qemu_get_8s( f, &s->status[i]); + qemu_get_8s( f, &hotplug_slots->status[i]); } - qemu_get_8s(f, &s->plug_evt); + qemu_get_8s(f, &hotplug_slots->plug_evt); return 0; } -- 2.39.5