qemu-e2k/qga
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
..
installer qga-win/msi: fix missing libstdc++-6 DLL in MSI installer 2021-08-03 07:01:36 -05:00
vss-win32 qga/vss-win32: check old VSS SDK headers 2022-03-15 11:26:20 +01:00
channel-posix.c util: rename qemu_open() to qemu_open_old() 2020-09-16 10:33:48 +01:00
channel-win32.c qga: Add spaces around operator 2021-03-16 20:20:37 -05:00
channel.h qga: add systemd socket activation support 2017-03-06 00:54:18 -06:00
commands-common.h qga: Extract qmp_guest_file_read() to common commands.c 2020-04-15 09:15:53 -05:00
commands-posix-ssh.c Remove superfluous ERRP_GUARD() 2021-08-26 17:15:28 +02:00
commands-posix.c qga: fix guest-get-disks regression 2021-04-20 16:27:45 +01:00
commands-win32.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
commands.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
guest-agent-command-state.c qga: use local path for local headers 2018-06-01 19:20:38 +03:00
guest-agent-core.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
main.c qga: return a more explicit error on why a command is disabled 2021-03-16 20:21:47 -05:00
meson.build qga/vss: update informative message about MinGW 2022-03-15 11:26:20 +01:00
qapi-schema.json qapi: Add spaces after symbol declaration for consistency 2021-10-02 07:33:41 +02:00
service-win32.c qga: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
service-win32.h qga-win: changing --retry-path option behavior 2018-10-31 09:04:20 -05:00
vss-win32.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
vss-win32.h qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00