qemu-e2k/hw/char
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
..
avr_usart.c
bcm2835_aux.c
cadence_uart.c
cmsdk-apb-uart.c
debugcon.c
digic-uart.c
escc.c escc: update the R_SPEC register SPEC_ALLSENT bit when writing to W_TXCTRL1 2021-11-21 09:56:52 +00:00
etraxfs_ser.c
exynos4210_uart.c hw/char/exynos4210_uart: Fix crash on trying to load VM state 2022-01-28 14:29:46 +00:00
goldfish_tty.c hw/m68k: Fix typo in SPDX tag 2021-11-09 10:11:27 +01:00
grlib_apbuart.c
ibex_uart.c
imx_serial.c
ipoctal232.c
Kconfig
mcf_uart.c
mchp_pfsoc_mmuart.c hw/char/mchp_pfsoc_mmuart: QOM'ify PolarFire MMUART 2021-10-07 08:41:33 +10:00
meson.build
nrf51_uart.c
omap_uart.c
parallel-isa.c
parallel.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
pl011.c
renesas_sci.c
riscv_htif.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
sclpconsole-lm.c
sclpconsole.c
serial-isa.c hw/isa: Inline and remove one-line isa_init_irq() 2022-03-08 19:38:17 +01:00
serial-pci-multi.c
serial-pci.c
serial.c
sh_serial.c hw/char/sh_serial: Add device id to trace output 2021-10-30 18:39:37 +02:00
shakti_uart.c hw/char: shakti_uart: Register device in 'input' category 2021-10-07 08:41:33 +10:00
sifive_uart.c hw/char: sifive_uart: Register device in 'input' category 2021-10-07 08:41:33 +10:00
spapr_vty.c
stm32f2xx_usart.c Fix STM32F2XX USART data register readout 2021-12-15 10:11:34 +00:00
terminal3270.c
trace-events hw/char/sh_serial: Add device id to trace output 2021-10-30 18:39:37 +02:00
trace.h
virtio-console.c
virtio-serial-bus.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
xen_console.c
xilinx_uartlite.c