mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
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;
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user