From b8fc5638788d2f1200e0db2c1575e37be5e474f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volker=20R=C3=BCmelin?= Date: Fri, 24 Feb 2023 20:05:45 +0100 Subject: [PATCH] audio: remove sw == NULL check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All call sites of audio_pcm_sw_write() guarantee that sw is not NULL. Remove the unnecessary NULL check. Acked-by: Mark Cave-Ayland Reviewed-by: Marc-AndrĂ© Lureau Signed-off-by: Volker RĂ¼melin Message-Id: <20230224190555.7409-5-vr_qemu@t-online.de> --- audio/audio.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 4412b5fad8..8f1c0e77b0 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -712,10 +712,6 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t size) size_t hw_free; size_t ret, total; - if (!sw) { - return size; - } - hwsamples = sw->hw->mix_buf.size; live = sw->total_hw_samples_mixed;