aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-08-15 01:15:44 -0700
committerMichael Tokarev <mjt@tls.msk.ru>2014-08-15 18:54:55 +0400
commit8945c7f75419a8191f3e99b341f1a485b48af766 (patch)
tree71de00ee36b0b38c5d1397c10f5e78244421b05e /hw
parentaa2ac1dac3d27b412e2dba4cde38724446751344 (diff)
intc: i8259: Convert Array allocation to g_new0
To be more array friendly and to indicate the IRQs are initially disconnected. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/intc/i8259.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index d0b0c52b97..a563b82c4e 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -472,7 +472,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
ISADevice *isadev;
int i;
- irq_set = g_malloc(ISA_NUM_IRQS * sizeof(qemu_irq));
+ irq_set = g_new0(qemu_irq, ISA_NUM_IRQS);
isadev = i8259_init_chip(TYPE_I8259, bus, true);
dev = DEVICE(isadev);