From: Takashi Iwai Subject: Re: [PATCH] alsa-utils: fix pcm_read() return value Date: Wed, 08 Jan 2014 11:57:32 +0100 Message-ID: References: <1389154697-23849-1-git-send-email-olivier@trillion01.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 90350265133 for ; Wed, 8 Jan 2014 11:57:32 +0100 (CET) In-Reply-To: <1389154697-23849-1-git-send-email-olivier@trillion01.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Olivier Langlois Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 7 Jan 2014 23:18:17 -0500, Olivier Langlois wrote: > > 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 Thanks, applied. Takashi > --- > aplay/aplay.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > 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; > } > > /* > -- > 1.8.5.2 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >