qemu-e2k/hw/timer
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
..
a9gtimer.c hw/timer: fix a9gtimer vmstate 2022-02-21 13:30:21 +00:00
allwinner-a10-pit.c
altera_timer.c
arm_mptimer.c
arm_timer.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
armv7m_systick.c hw/timer/armv7m_systick: Update clock source before enabling timer 2022-02-08 10:56:28 +00:00
aspeed_timer.c
avr_timer16.c
bcm2835_systmr.c
cadence_ttc.c
cmsdk-apb-dualtimer.c
cmsdk-apb-timer.c
digic-timer.c
etraxfs_timer.c hw/timer/etraxfs_timer: Add vmstate for ETRAX timers 2022-01-18 12:32:16 +01:00
exynos4210_mct.c
exynos4210_pwm.c
grlib_gptimer.c
hpet.c
i8254_common.c
i8254.c
ibex_timer.c hw: timer: ibex_timer: update/add reg address 2022-01-21 15:52:56 +10:00
imx_epit.c
imx_gpt.c
Kconfig hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
meson.build hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
mips_gictimer.c
mss-timer.c
npcm7xx_timer.c
nrf51_timer.c
omap_gptimer.c
omap_synctimer.c
pxa2xx_timer.c
renesas_cmt.c
renesas_tmr.c
sh_timer.c hw/timer/sh_timer: Remove use of hw_error 2021-10-30 18:39:37 +02:00
sifive_pwm.c hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
slavio_timer.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
sse-counter.c
sse-timer.c
stellaris-gptm.c hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale 2021-09-01 11:08:20 +01:00
stm32f2xx_timer.c
trace-events hw/sh4: Change debug printfs to traces 2021-10-30 18:39:37 +02:00
trace.h
xilinx_timer.c