diff options
author | Greg Kurz <groug@kaod.org> | 2018-11-27 14:06:01 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-12-21 09:24:23 +1100 |
commit | 0989e6d1f265c04efa07db52617793e9862ed159 (patch) | |
tree | a613c6844adf5901dbe50180e6deacece6d0cdbe /hw/ppc/sam460ex.c | |
parent | 30f8ec76309e7b7ce235f4e544553d078a88ce5e (diff) | |
download | qemu-0989e6d1f265c04efa07db52617793e9862ed159.zip qemu-0989e6d1f265c04efa07db52617793e9862ed159.tar.gz qemu-0989e6d1f265c04efa07db52617793e9862ed159.tar.bz2 |
sam460ex: use g_new(T, n) instead of g_malloc(sizeof(T) * n)
Because it is a recommended coding practice (see HACKING).
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/sam460ex.c')
-rw-r--r-- | hw/ppc/sam460ex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 5aac58f..4b051c0 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -430,7 +430,7 @@ static void sam460ex_init(MachineState *machine) ppc4xx_plb_init(env); /* interrupt controllers */ - irqs = g_malloc0(sizeof(*irqs) * PPCUIC_OUTPUT_NB); + irqs = g_new0(qemu_irq, PPCUIC_OUTPUT_NB); irqs[PPCUIC_OUTPUT_INT] = ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT_INT]; irqs[PPCUIC_OUTPUT_CINT] = ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT_CINT]; uic[0] = ppcuic_init(env, irqs, 0xc0, 0, 1); |