mirror of https://github.com/xqemu/xqemu.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 <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
aa2ac1dac3
commit
8945c7f754
|
@ -472,7 +472,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
|
||||||
ISADevice *isadev;
|
ISADevice *isadev;
|
||||||
int i;
|
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);
|
isadev = i8259_init_chip(TYPE_I8259, bus, true);
|
||||||
dev = DEVICE(isadev);
|
dev = DEVICE(isadev);
|
||||||
|
|
Loading…
Reference in New Issue