summaryrefslogtreecommitdiffstats
path: root/hw/m68k/mcf5206.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/m68k/mcf5206.c')
-rw-r--r--hw/m68k/mcf5206.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c
index fbf3f0f074..bd8e993c58 100644
--- a/hw/m68k/mcf5206.c
+++ b/hw/m68k/mcf5206.c
@@ -138,7 +138,7 @@ static m5206_timer_state *m5206_timer_init(qemu_irq irq)
m5206_timer_state *s;
QEMUBH *bh;
- s = (m5206_timer_state *)g_malloc0(sizeof(m5206_timer_state));
+ s = g_new0(m5206_timer_state, 1);
bh = qemu_bh_new(m5206_timer_trigger, s);
s->timer = ptimer_init(bh, PTIMER_POLICY_DEFAULT);
s->irq = irq;
@@ -534,7 +534,7 @@ qemu_irq *mcf5206_init(MemoryRegion *sysmem, uint32_t base, M68kCPU *cpu)
m5206_mbar_state *s;
qemu_irq *pic;
- s = (m5206_mbar_state *)g_malloc0(sizeof(m5206_mbar_state));
+ s = g_new0(m5206_mbar_state, 1);
memory_region_init_io(&s->iomem, NULL, &m5206_mbar_ops, s,
"mbar", 0x00001000);