aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-10 21:24:35 +0100
committerMax Kellermann <max@duempel.org>2009-02-10 21:24:35 +0100
commit54982f755f208c1b0c1de4734e5c1b6d78dff6ea (patch)
treefec103fb461d340e0bdf903f8e72ff547fa83256 /src
parentfe142647a5e20488af3c777b39edc74a17ae4039 (diff)
downloadmpd-54982f755f208c1b0c1de4734e5c1b6d78dff6ea.tar.gz
mpd-54982f755f208c1b0c1de4734e5c1b6d78dff6ea.tar.xz
mpd-54982f755f208c1b0c1de4734e5c1b6d78dff6ea.zip
ao: declare AoData.writeSize as size_t
writeSize is a memory size and its type should thus be size_t. This allows us to remove two explicit casts.
Diffstat (limited to 'src')
-rw-r--r--src/output/ao_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/ao_plugin.c b/src/output/ao_plugin.c
index 655d267fd..b0662d7a1 100644
--- a/src/output/ao_plugin.c
+++ b/src/output/ao_plugin.c
@@ -27,7 +27,7 @@
static int driverInitCount;
typedef struct _AoData {
- int writeSize;
+ size_t writeSize;
int driverId;
ao_option *options;
ao_device *device;
@@ -218,8 +218,8 @@ audioOutputAo_play(void *data, const char *playChunk, size_t size)
return false;
while (size > 0) {
- chunk_size = (size_t)ad->writeSize > size
- ? size : (size_t)ad->writeSize;
+ chunk_size = ad->writeSize > size
+ ? size : ad->writeSize;
if (ao_play_deconst(ad->device, playChunk, chunk_size) == 0) {
audioOutputAo_error("Closing libao device due to play error");