mirror_qemu/hw/remote
Markus Armbruster c5e8d51824 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...

The previous iteration was commit a95942b50c.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220923084254.4173111-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-10-04 00:10:11 +02:00
..
Kconfig vfio-user: build library 2022-06-15 16:42:33 +01:00
iohub.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
iommu.c Use g_new() & friends where that makes obvious sense 2022-10-04 00:10:11 +02:00
machine.c vfio-user: handle device interrupts 2022-06-15 16:43:42 +01:00
memory.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
meson.build vfio-user: IOMMU support for remote device 2022-06-15 16:43:42 +01:00
message.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
mpqemu-link.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
proxy-memory-listener.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
proxy.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
remote-obj.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
trace-events vfio-user: handle device interrupts 2022-06-15 16:43:42 +01:00
trace.h multi-process: define MPQemuMsg format and transmission functions 2021-02-10 09:23:28 +00:00
vfio-user-obj.c vfio-user: handle reset of remote device 2022-06-15 16:43:42 +01:00