mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 11:53:53 -06:00
hw/audio/asc: replace g_malloc0() with g_malloc()
There is no need to allocate initialized memory with g_malloc0() if it's directly followed by a memset() function call. g_malloc() is sufficient. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20250515054429.7385-5-vr_qemu@t-online.de>
This commit is contained in:
parent
d009f26a54
commit
f4b1c3db11
1 changed files with 1 additions and 1 deletions
|
@ -664,7 +664,7 @@ static void asc_realize(DeviceState *dev, Error **errp)
|
|||
s->samples = AUD_get_buffer_size_out(s->voice) >> s->shift;
|
||||
s->mixbuf = g_malloc0(s->samples << s->shift);
|
||||
|
||||
s->silentbuf = g_malloc0(s->samples << s->shift);
|
||||
s->silentbuf = g_malloc(s->samples << s->shift);
|
||||
memset(s->silentbuf, 0x80, s->samples << s->shift);
|
||||
|
||||
/* Add easc registers if required */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue