]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplay: fix pcm_read() return value
authorOlivier Langlois <olivier@trillion01.com>
Wed, 8 Jan 2014 04:18:17 +0000 (23:18 -0500)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Jan 2014 10:56:52 +0000 (11:56 +0100)
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 <olivier@trillion01.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c

index e0631c4aa7522d099152b7d6ca5c0f41ae5b82ae..69e8bdab63b7dc8327b588d681001a49bdf07c6e 100644 (file)
@@ -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;
 }
 
 /*