audio/audio_template: use g_malloc0() to replace audio_calloc()

Use g_malloc0() as a direct replacement for audio_calloc().

Since the type of the parameter n_bytes of the function g_malloc0()
is unsigned, the type of the variables voice_size_out and
voice_size_in has been changed to size_t. This means that the
function argument no longer has to be checked for negative values.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230121094735.11644-7-vr_qemu@t-online.de>
This commit is contained in:
Volker Rümelin
2023-01-21 10:47:31 +01:00
committed by Marc-André Lureau
parent d1def19fa3
commit 3724ab3b34
2 changed files with 10 additions and 12 deletions

View File

@ -151,8 +151,8 @@ struct audio_driver {
int can_be_default;
int max_voices_out;
int max_voices_in;
int voice_size_out;
int voice_size_in;
size_t voice_size_out;
size_t voice_size_in;
QLIST_ENTRY(audio_driver) next;
};