From: Olivier Langlois Date: Wed, 8 Jan 2014 04:18:17 +0000 (-0500) Subject: aplay: fix pcm_read() return value X-Git-Tag: v1.0.28~18 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=8aa13eec80eac312e4b99423909387660fb99b8f;p=alsa-utils.git aplay: fix pcm_read() return value Because of the way the pcm_read() functions are currently used, returning rcount or result is equivalent but I feel it is more accurate to return 'result'. Signed-off-by: Olivier Langlois Signed-off-by: Takashi Iwai --- diff --git a/aplay/aplay.c b/aplay/aplay.c index e0631c4..69e8bda 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -2039,7 +2039,7 @@ static ssize_t pcm_read(u_char *data, size_t rcount) data += r * bits_per_frame / 8; } } - return rcount; + return result; } static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount) @@ -2084,7 +2084,7 @@ static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount) count -= r; } } - return rcount; + return result; } /*