From c069b89d86f9cc1f45b8917fbad77e5a860e938f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:06:57 +0000 Subject: use unsigned integers in outputBuffer.c The chunk index cannot be negative. git-svn-id: https://svn.musicpd.org/mpd/trunk@7231 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/outputBuffer.c | 2 +- src/outputBuffer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 15b7b26d9..dab233668 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -118,7 +118,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, while (datalen) { if (currentChunk != cb->end) { - int next = cb->end + 1; + unsigned int next = cb->end + 1; if (next >= buffered_chunks) { next = 0; } diff --git a/src/outputBuffer.h b/src/outputBuffer.h index 99d3010f0..ab4ccc893 100644 --- a/src/outputBuffer.h +++ b/src/outputBuffer.h @@ -38,8 +38,8 @@ typedef struct _OutputBuffer { mpd_uint16 *volatile chunkSize; mpd_uint16 *volatile bitRate; float *volatile times; - mpd_sint16 volatile begin; - mpd_sint16 volatile end; + mpd_uint16 volatile begin; + mpd_uint16 volatile end; AudioFormat audioFormat; ConvState convState; MetadataChunk metadataChunks[BUFFERED_METACHUNKS]; -- cgit v1.2.3