OSDN Git Service

test/pcm_min: Fix error messages
authorChristophe Lohr <christophe.lohr@cegetel.net>
Mon, 1 Jun 2015 11:43:36 +0000 (13:43 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 1 Jun 2015 11:43:36 +0000 (13:43 +0200)
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

index e971405..7462a45 100644 (file)
@@ -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))