From 2d2ccb6060a12380644d2027252bc2e0ae145daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volker=20R=C3=BCmelin?= Date: Sat, 21 Jan 2023 10:47:33 +0100 Subject: audio: remove audio_calloc() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the last call site of audio_calloc() was removed, remove the unused audio_calloc() function. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Message-Id: <20230121094735.11644-9-vr_qemu@t-online.de> --- audio/audio.c | 20 -------------------- audio/audio_int.h | 1 - 2 files changed, 21 deletions(-) (limited to 'audio') diff --git a/audio/audio.c b/audio/audio.c index 012d109..772c3cc 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -149,26 +149,6 @@ static inline int audio_bits_to_index (int bits) } } -void *audio_calloc (const char *funcname, int nmemb, size_t size) -{ - int cond; - size_t len; - - len = nmemb * size; - cond = !nmemb || !size; - cond |= nmemb < 0; - cond |= len < size; - - if (audio_bug ("audio_calloc", cond)) { - AUD_log (NULL, "%s passed invalid arguments to audio_calloc\n", - funcname); - AUD_log (NULL, "nmemb=%d size=%zu (len=%zu)\n", nmemb, size, len); - return NULL; - } - - return g_malloc0 (len); -} - void AUD_vlog (const char *cap, const char *fmt, va_list ap) { if (cap) { diff --git a/audio/audio_int.h b/audio/audio_int.h index ce2d6bf..5028f23 100644 --- a/audio/audio_int.h +++ b/audio/audio_int.h @@ -251,7 +251,6 @@ void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as); void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int len); int audio_bug (const char *funcname, int cond); -void *audio_calloc (const char *funcname, int nmemb, size_t size); void audio_run(AudioState *s, const char *msg); -- cgit v1.1