diff options
author | Max Kellermann <max@duempel.org> | 2008-04-12 04:16:08 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-12 04:16:08 +0000 |
commit | 1ad2f07a3930291e488642ff7ef2f1c4314b7c36 (patch) | |
tree | 851606341fc5bc2bf39866b7e5093e66bab73287 /src/audio.c | |
parent | c9d80d609057a0b34d1cb7caba34f8071c92122b (diff) | |
download | mpd-1ad2f07a3930291e488642ff7ef2f1c4314b7c36.tar.gz mpd-1ad2f07a3930291e488642ff7ef2f1c4314b7c36.tar.xz mpd-1ad2f07a3930291e488642ff7ef2f1c4314b7c36.zip |
use size_t in audio.c
Buffer sizes should be size_t. This is safe here, at least not
unsafer than without the patch. I have no idea why audioBufferSize
and audioBufferPos were explicitly declared as signed integer.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audio.c')
-rw-r--r-- | src/audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audio.c b/src/audio.c index 9ca85c58d..5f4d1abb5 100644 --- a/src/audio.c +++ b/src/audio.c @@ -49,9 +49,9 @@ static mpd_uint8 *audioDeviceStates; static mpd_uint8 audioOpened; -static mpd_sint32 audioBufferSize; +static size_t audioBufferSize; static char *audioBuffer; -static mpd_sint32 audioBufferPos; +static size_t audioBufferPos; unsigned int audio_device_count(void) { @@ -358,9 +358,9 @@ int openAudioDevice(AudioFormat * audioFormat) return ret; } -int playAudio(const char *playChunk, int size) +int playAudio(const char *playChunk, size_t size) { - int send_size; + size_t send_size; while (size > 0) { send_size = audioBufferSize - audioBufferPos; |