From 25c04a97d3bab513134d78153a0fb0c3ac0fd553 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Wed, 17 Dec 2008 15:50:23 +0100 Subject: Remove useless computation. After the pthread_cond_wait loop there are at least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size). --- src/output/osx_plugin.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/output/osx_plugin.c') diff --git a/src/output/osx_plugin.c b/src/output/osx_plugin.c index a00fbdbdd..7af8be3a2 100644 --- a/src/output/osx_plugin.c +++ b/src/output/osx_plugin.c @@ -330,8 +330,6 @@ osx_play(void *data, const char *playChunk, size_t size) pthread_cond_wait(&od->condition, &od->mutex); } - bytesToCopy = od->bufferSize - od->len; - bytesToCopy = bytesToCopy < size ? bytesToCopy : size; size -= bytesToCopy; od->len += bytesToCopy; -- cgit v1.2.3