aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:11:34 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:11:34 +0000
commit0defe87da7a030da1914e44d1d2ad4d837cd89be (patch)
tree0dd2b113776d954c2aef25ecfa1613a37b11547b /src/decode.c
parent4150a49b36c6987ede6ddf126f4e7b73d0f49276 (diff)
downloadmpd-0defe87da7a030da1914e44d1d2ad4d837cd89be.tar.gz
mpd-0defe87da7a030da1914e44d1d2ad4d837cd89be.tar.xz
mpd-0defe87da7a030da1914e44d1d2ad4d837cd89be.zip
replace advanceOutputBufferTo() with trivial assignment
After the previous patch, it is clear that the loop in advanceOutputBufferTo() can be replaced with a simple assignment. git-svn-id: https://svn.musicpd.org/mpd/trunk@7249 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/decode.c b/src/decode.c
index 2d23ae7b8..a07d61843 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -398,12 +398,7 @@ void decoderInit(void)
static void advanceOutputBufferTo(OutputBuffer * cb, int to)
{
- while (cb->begin != to) {
- if ((unsigned)cb->begin + 1 >= buffered_chunks)
- cb->begin = 0;
- else
- cb->begin++;
- }
+ cb->begin = to;
}
static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb)