From fae23a511192513439b8643c6801ba7766ef8be0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:11:46 +0000 Subject: simplified some code in decode.c The block after "if" breaks out of the loop. To make the code a little bit more readable, don't write the rest in an "else" block, since this code path does not break. git-svn-id: https://svn.musicpd.org/mpd/trunk@7251 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/decode.c') diff --git a/src/decode.c b/src/decode.c index 520485383..386c45a55 100644 --- a/src/decode.c +++ b/src/decode.c @@ -546,18 +546,17 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * if (pc->queueState != PLAYER_QUEUE_PLAY) { quit = 1; break; - } else { - next = -1; - if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < - 0) { - return; - } - nextChunk = -1; - doCrossFade = 0; - crossFadeChunks = 0; - pc->queueState = PLAYER_QUEUE_EMPTY; - wakeup_main_task(); } + + next = -1; + if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < 0) + return; + + nextChunk = -1; + doCrossFade = 0; + crossFadeChunks = 0; + pc->queueState = PLAYER_QUEUE_EMPTY; + wakeup_main_task(); } else if (dc->state == DECODE_STATE_STOP && !dc->start) { quit = 1; break; -- cgit v1.2.3