From 00a16b49ba22d8a5749dc23eec7a9d0e454f0d24 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:14:14 +0000 Subject: use break instead of quitDecode()+return The code paths which return from the functions all have to call quitDecode(). If we simply break instead of calling quitDecode() explicitly, this function gets called in the last line of this function anyway. git-svn-id: https://svn.musicpd.org/mpd/trunk@7278 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/decode.c b/src/decode.c index 495251a09..06c054e3b 100644 --- a/src/decode.c +++ b/src/decode.c @@ -427,8 +427,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * &decodeWaitedOn, &next); if (pc->stop) { dropBufferedAudio(); - quitDecode(pc,dc); - return; + break; } if (buffering) { @@ -453,8 +452,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * ERROR("problems opening audio device " "while playing \"%s\"\n", get_song_url(tmp, pc->current_song)); - quitDecode(pc,dc); - return; + break; } else { player_wakeup_decoder(); } @@ -472,8 +470,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * /* the decoder failed */ pc->errored_song = pc->current_song; pc->error = PLAYER_ERROR_FILE; - quitDecode(pc,dc); - return; + break; } else { /* the decoder is not yet ready; wait -- cgit v1.2.3