forked from pool/alsa-utils
Takashi Iwai
fc5e344afa
- Backport minor fix patches for alsactl and aplay from upstream: 0017-alsactl-Fix-the-va_list-initialization-in-cerror_-an.patch 0018-aplay-fix-pcm_read-return-value.patch 0019-alsa-restore.rules-refer-to-correct-attr.patch 0020-aplay-fix-timespec-to-msec-conversion.patch OBS-URL: https://build.opensuse.org/request/show/220463 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=96
41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
From 8aa13eec80eac312e4b99423909387660fb99b8f Mon Sep 17 00:00:00 2001
|
|
From: Olivier Langlois <olivier@trillion01.com>
|
|
Date: Tue, 7 Jan 2014 23:18:17 -0500
|
|
Subject: [PATCH] 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 <olivier@trillion01.com>
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
aplay/aplay.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/aplay/aplay.c b/aplay/aplay.c
|
|
index e0631c4aa752..69e8bdab63b7 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.4.5
|
|
|