qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PULL 18/20] intc: i8259: Convert Array allocation to g_n


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 18/20] intc: i8259: Convert Array allocation to g_new0
Date: Fri, 15 Aug 2014 19:15:09 +0400

From: Peter Crosthwaite <address@hidden>

To be more array friendly and to indicate the IRQs are initially
disconnected.

Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 hw/intc/i8259.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index d0b0c52..a563b82 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);
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]