From 0defe87da7a030da1914e44d1d2ad4d837cd89be Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:11:34 +0000 Subject: 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 --- src/decode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/decode.c') 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) -- cgit v1.2.3