qemu/audio
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
..
alsaaudio.c audio: restore mixing-engine playback buffer size 2022-03-04 11:05:13 +01:00
audio_int.h audio: restore mixing-engine playback buffer size 2022-03-04 11:05:13 +01:00
audio_legacy.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
audio_template.h audio: Log context for audio bug 2022-03-15 13:36:33 +01:00
audio_win_int.c dsoundaudio: fix log message 2021-01-15 11:25:22 +01:00
audio_win_int.h
audio.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
audio.h qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
coreaudio.m audio: Rename coreaudio extension to use Objective-C compiler 2022-03-15 13:36:33 +01:00
dbusaudio.c audio: add "dbus" audio backend 2021-12-21 10:50:22 +04:00
dsound_template.h dsoundaudio: replace GetForegroundWindow() 2021-01-15 11:25:22 +01:00
dsoundaudio.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
jackaudio.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
meson.build audio: Rename coreaudio extension to use Objective-C compiler 2022-03-15 13:36:33 +01:00
mixeng_template.h audio: fix saturation nonlinearity in clip_* functions 2020-03-16 10:18:07 +01:00
mixeng.c audio/mixeng: Do not declare unused variables 2022-03-18 09:32:48 +01:00
mixeng.h audio: proper support for float samples in mixeng 2020-02-06 14:35:57 +01:00
noaudio.c audio: restore mixing-engine playback buffer size 2022-03-04 11:05:13 +01:00
ossaudio.c ossaudio: reduce effective playback buffer size 2022-03-04 11:05:13 +01:00
paaudio.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
rate_template.h audio: use size_t where makes sense 2019-08-21 09:13:37 +02:00
sdlaudio.c sdlaudio: fix samples vs. frames mix-up 2022-03-04 11:05:13 +01:00
spiceaudio.c modules: add audio module annotations 2021-07-09 18:20:27 +02:00
trace-events audio: add "dbus" audio backend 2021-12-21 10:50:22 +04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
wavaudio.c audio: restore mixing-engine playback buffer size 2022-03-04 11:05:13 +01:00
wavcapture.c monitor: Use getter/setter functions for cur_mon 2020-10-09 07:08:19 +02:00