aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k/mcf5208.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-10-06 20:49:18 -0300
committerThomas Huth <thuth@redhat.com>2017-10-16 13:29:49 +0200
commitd3c9218840c070f1c81ac20bc02fb6aafc6e3803 (patch)
treef04b1804d0d3059e45701c444b534239efd47ee9 /hw/m68k/mcf5208.c
parent45876e913e169bf156a3fc36f21eb0adf6ec3671 (diff)
M68K: use g_new() family of functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [PMD: squashed commits] Reviewed-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/m68k/mcf5208.c')
-rw-r--r--hw/m68k/mcf5208.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index c9c5f5e588..68589c36d2 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -184,7 +184,7 @@ static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic)
memory_region_add_subregion(address_space, 0xfc0a8000, iomem);
/* Timers. */
for (i = 0; i < 2; i++) {
- s = (m5208_timer_state *)g_malloc0(sizeof(m5208_timer_state));
+ s = g_new0(m5208_timer_state, 1);
bh = qemu_bh_new(m5208_timer_trigger, s);
s->timer = ptimer_init(bh, PTIMER_POLICY_DEFAULT);
memory_region_init_io(&s->iomem, NULL, &m5208_timer_ops, s,