qemu-e2k/hw/vfio
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
..
amd-xgbe.c
ap.c target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
calxeda-xgmac.c
ccw.c vfio-ccw: forward halt/clear errors 2021-09-06 16:22:54 +02:00
common.c vfio: Fix memory leak of hostwin 2021-11-17 11:25:55 -07:00
display.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
igd.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
Kconfig
meson.build vfio: Add migration region initialization and finalize function 2020-11-01 12:30:50 -07:00
migration.c vfio: Avoid error_propagate() after migrate_add_blocker() 2021-08-26 17:15:28 +02:00
pci-quirks.c hw/vfio: Fix typo in comments 2021-09-16 11:57:01 +02:00
pci.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
pci.h hw/vfio/pci-quirks: Replace the word 'blacklist' 2021-03-16 10:06:44 -06:00
platform.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
spapr.c memory: Name all the memory listeners 2021-09-30 15:30:24 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h