[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] pc_init1: Don't misuse int for holding up a boo
From: |
Michal Privoznik |
Subject: |
[Qemu-devel] [PATCH 1/2] pc_init1: Don't misuse int for holding up a bool |
Date: |
Wed, 20 May 2015 11:15:49 +0200 |
When going through code I realized, that the pc_init1() has this two
arguments @pci_enabled and @kvmclock_enabled which despite used as
booleans are of int type.
Signed-off-by: Michal Privoznik <address@hidden>
---
hw/i386/pc_piix.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 212e263..97650b0 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -74,8 +74,8 @@ static bool has_reserved_memory = true;
/* PC hardware initialisation */
static void pc_init1(MachineState *machine,
- int pci_enabled,
- int kvmclock_enabled)
+ bool pci_enabled,
+ bool kvmclock_enabled)
{
PCMachineState *pc_machine = PC_MACHINE(machine);
MemoryRegion *system_memory = get_system_memory();
@@ -307,7 +307,7 @@ static void pc_init1(MachineState *machine,
static void pc_init_pci(MachineState *machine)
{
- pc_init1(machine, 1, 1);
+ pc_init1(machine, true, true);
}
static void pc_compat_2_3(MachineState *machine)
@@ -483,7 +483,7 @@ static void pc_init_pci_1_2(MachineState *machine)
static void pc_init_pci_no_kvmclock(MachineState *machine)
{
pc_compat_1_2(machine);
- pc_init1(machine, 1, 0);
+ pc_init1(machine, true, false);
}
static void pc_init_isa(MachineState *machine)
@@ -500,7 +500,7 @@ static void pc_init_isa(MachineState *machine)
}
x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode();
- pc_init1(machine, 0, 1);
+ pc_init1(machine, false, true);
}
#ifdef CONFIG_XEN
--
2.3.6