提交 8945c7f7 编写于 作者: P Peter Crosthwaite 提交者: Michael Tokarev

intc: i8259: Convert Array allocation to g_new0

To be more array friendly and to indicate the IRQs are initially
disconnected.
Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 aa2ac1da
...@@ -472,7 +472,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq) ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册