From eb5d51c98859b7c2c14dd7f7b9b9d83bd283f631 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:17:22 +0000 Subject: fixed another shadow warning git-svn-id: https://svn.musicpd.org/mpd/trunk@7307 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutputs/audioOutput_ao.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c index c28415410..65ffa2c27 100644 --- a/src/audioOutputs/audioOutput_ao.c +++ b/src/audioOutputs/audioOutput_ao.c @@ -59,7 +59,7 @@ static int audioOutputAo_initDriver(AudioOutput * audioOutput, ConfigParam * param) { ao_info *ai; - char *dup; + char *duplicated; char *stk1; char *stk2; char *n1; @@ -105,13 +105,13 @@ static int audioOutputAo_initDriver(AudioOutput * audioOutput, blockParam = getBlockParam(param, "options"); if (blockParam) { - dup = xstrdup(blockParam->value); + duplicated = xstrdup(blockParam->value); } else - dup = xstrdup(""); + duplicated = xstrdup(""); - if (strlen(dup)) { + if (strlen(duplicated)) { stk1 = NULL; - n1 = strtok_r(dup, ";", &stk1); + n1 = strtok_r(duplicated, ";", &stk1); while (n1) { stk2 = NULL; key = strtok_r(n1, "=", &stk2); @@ -136,7 +136,7 @@ static int audioOutputAo_initDriver(AudioOutput * audioOutput, n1 = strtok_r(NULL, ";", &stk1); } } - free(dup); + free(duplicated); return 0; } @@ -219,25 +219,25 @@ static int ao_play_deconst(ao_device *device, const void *output_samples, static int audioOutputAo_play(AudioOutput * audioOutput, const char *playChunk, size_t size) { - size_t send; + size_t chunk_size; AoData *ad = (AoData *) audioOutput->data; if (ad->device == NULL) return -1; while (size > 0) { - send = (size_t)ad->writeSize > size + chunk_size = (size_t)ad->writeSize > size ? size : (size_t)ad->writeSize; - if (ao_play_deconst(ad->device, playChunk, send) == 0) { + if (ao_play_deconst(ad->device, playChunk, chunk_size) == 0) { audioOutputAo_error(); ERROR("closing audio device due to write error\n"); audioOutputAo_closeDevice(audioOutput); return -1; } - playChunk += send; - size -= send; + playChunk += chunk_size; + size -= chunk_size; } return 0; -- cgit v1.2.3