From: Peter Crosthwaite Date: Fri, 15 Aug 2014 08:15:44 +0000 (-0700) Subject: intc: i8259: Convert Array allocation to g_new0 X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~653^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8945c7f75419a8191f3e99b341f1a485b48af766;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Michael Tokarev --- 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);