From e9387193d547facd183250b27a2a3eaf1aff0395 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Thu, 15 Jun 2023 14:05:06 +0200 Subject: [PATCH] Some style nits --- audio/common/alsa.c | 9 ++++----- audio/common/alsathread.c | 4 +--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/audio/common/alsa.c b/audio/common/alsa.c index e564e9897f..f1b011a2e8 100644 --- a/audio/common/alsa.c +++ b/audio/common/alsa.c @@ -446,7 +446,10 @@ struct string_list *alsa_device_list_type_new(const char* type) attr.i = 0; if (snd_device_name_hint(-1, "pcm", &hints) != 0) - goto error; + { + string_list_free(s); + return NULL; + } n = hints; @@ -476,8 +479,4 @@ struct string_list *alsa_device_list_type_new(const char* type) snd_device_name_free_hint(hints); return s; - - error: - string_list_free(s); - return NULL; } diff --git a/audio/common/alsathread.c b/audio/common/alsathread.c index 48a771f304..b49148e9e8 100644 --- a/audio/common/alsathread.c +++ b/audio/common/alsathread.c @@ -36,10 +36,8 @@ void alsa_thread_free_info_members(alsa_thread_info_t *info) if (info->cond_lock) slock_free(info->cond_lock); if (info->pcm) - { alsa_free_pcm(info->pcm); - } } /* Do NOT free() info itself; it's embedded within another struct * that will be freed. */ -} \ No newline at end of file +}