qemu-e2k/hw/core
Markus Armbruster b21e238037 Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
for two reasons.  One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.

This commit only touches allocations with size arguments of the form
sizeof(T).

Patch created mechanically with:

    $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \
	     --macro-file scripts/cocci-macro-file.h FILES...

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20220315144156.1595462-4-armbru@redhat.com>
Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
2022-03-21 15:44:44 +01:00
..
bus.c
clock-vmstate.c clock-vmstate: Add missing END_OF_LIST 2022-03-02 18:12:40 +00:00
clock.c
cpu-common.c Revert "cpu: Move cpu_common_props to hw/core/cpu.c" 2021-10-15 16:39:15 -07:00
cpu-sysemu.c
fw-path-provider.c
generic-loader.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
gpio.c hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter 2021-12-31 13:21:36 +01:00
guest-loader.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
guest-loader.h
hotplug-stubs.c hw/core: Restrict hotplug to system emulation 2021-11-01 19:44:11 +01:00
hotplug.c
irq.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
Kconfig
loader-fit.c
loader.c semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO 2022-02-28 16:42:35 +00:00
machine-hmp-cmds.c qapi: introduce x-query-numa QMP command 2021-11-02 15:55:14 +00:00
machine-qmp-cmds.c qapi: introduce x-query-numa QMP command 2021-11-02 15:55:14 +00:00
machine-smp.c hw/core/machine: Introduce CPU cluster topology support 2021-12-31 13:42:39 +01:00
machine.c machine: Use host_memory_backend_is_mapped() in machine_consume_memdev() 2022-01-18 10:45:35 +01:00
meson.build hw/core/machine: Split out the smp parsing code 2021-11-01 19:44:11 +01:00
nmi.c
null-machine.c
numa.c numa: Enable numa for SGX EPC sections 2021-12-10 09:47:18 +01:00
or-irq.c
platform-bus.c
ptimer.c core/ptimers: Remove unnecessary 'sysemu/cpus.h' include 2022-02-21 10:18:06 +01:00
qdev-clock.c
qdev-fw.c
qdev-hotplug.c hw/core: Extract hotplug-related functions to qdev-hotplug.c 2021-11-01 19:44:11 +01:00
qdev-prop-internal.h
qdev-properties-system.c
qdev-properties.c
qdev.c hw/core: Extract hotplug-related functions to qdev-hotplug.c 2021-11-01 19:44:11 +01:00
register.c
reset.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
resettable.c
split-irq.c
stream.c
sysbus.c
trace-events
trace.h
uboot_image.h
vm-change-state-handler.c
vmstate-if.c