Commit 1308290c authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

yet another migration to size_t

We can also get rid of one the two variables. git-svn-id: https://svn.musicpd.org/mpd/trunk@7341 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent bc7e60cb
......@@ -204,8 +204,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
size_t dataInLen, float data_time, mpd_uint16 bitRate,
ReplayGainInfo * replayGainInfo)
{
mpd_uint16 dataToSend;
mpd_uint16 chunkLeft;
size_t dataToSend;
char *data;
size_t datalen;
static char *convBuffer;
......@@ -244,8 +243,9 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
chunk = outputBufferGetChunk(cb, chunk_index);
chunkLeft = sizeof(chunk->data) - chunk->chunkSize;
dataToSend = datalen > chunkLeft ? chunkLeft : datalen;
dataToSend = sizeof(chunk->data) - chunk->chunkSize;
if (dataToSend > datalen)
dataToSend = datalen;
memcpy(chunk->data + chunk->chunkSize, data, dataToSend);
chunk->chunkSize += dataToSend;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment