File 0018-test-pcm_min-Fix-error-messages.patch of Package alsa

From 8551fe258791c165892583006b0aa5142f41b621 Mon Sep 17 00:00:00 2001
From: Christophe Lohr <christophe.lohr@cegetel.net>
Date: Mon, 1 Jun 2015 13:43:36 +0200
Subject: [PATCH] test/pcm_min: Fix error messages

Fix the wrongly referred error code for error messages from
snd_pcm_writei() and other calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 test/pcm_min.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/pcm_min.c b/test/pcm_min.c
index e971405ee64f..7462a45fef33 100644
--- a/test/pcm_min.c
+++ b/test/pcm_min.c
@@ -39,7 +39,7 @@ int main(void)
                 if (frames < 0)
                         frames = snd_pcm_recover(handle, frames, 0);
                 if (frames < 0) {
-                        printf("snd_pcm_writei failed: %s\n", snd_strerror(err));
+                        printf("snd_pcm_writei failed: %s\n", snd_strerror(frames));
                         break;
                 }
                 if (frames > 0 && frames < (long)sizeof(buffer))
-- 
2.4.3

openSUSE Build Service is sponsored by