qemu-e2k/hw/mips
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
..
Kconfig hw/display: Rename VGA_ISA_MM -> VGA_MMIO 2022-01-13 10:58:54 +01:00
bootloader.c hw/mips/bootloader: Fix write_ulong() 2021-12-06 11:57:31 +01:00
boston.c hw/mips/boston: Fix load_elf() error detection 2021-12-06 11:57:36 +01:00
cps.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
fuloong2e.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
fw_cfg.c hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
fw_cfg.h hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
gt64xxx_pci.c hw/mips/gt64xxx_pci: Resolve gt64120_register() 2022-03-08 19:38:13 +01:00
jazz.c hw/mips/jazz: Inline vga_mmio_init() and remove it 2022-01-13 10:58:54 +01:00
loongson3_bootp.c hw/mips: Add Loongson-3 boot parameter helpers 2021-01-04 23:33:38 +01:00
loongson3_bootp.h hw/mips: loongson3: Drop 'struct MemmapEntry' 2021-02-21 14:22:09 +01:00
loongson3_virt.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
malta.c hw/mips/gt64xxx_pci: Resolve gt64120_register() 2022-03-08 19:38:13 +01:00
meson.build hw/mips: Restrict non-virtualized machines to TCG 2021-05-02 16:49:35 +02:00
mips_int.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
mipssim.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
trace-events hw/mips/gt64xxx: Trace accesses to ISD registers 2021-03-13 20:29:36 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00