aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:11:46 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:11:46 +0000
commitfae23a511192513439b8643c6801ba7766ef8be0 (patch)
tree6ca621baa03c8b37451ad21cdf699081cc188cde
parenta7b19012d309ae0c32562a18e416ac2f961eea95 (diff)
downloadmpd-fae23a511192513439b8643c6801ba7766ef8be0.tar.gz
mpd-fae23a511192513439b8643c6801ba7766ef8be0.tar.xz
mpd-fae23a511192513439b8643c6801ba7766ef8be0.zip
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
-rw-r--r--src/decode.c21
1 files changed, 10 insertions, 11 deletions
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;