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>
This commit is contained in:
Christophe Lohr 2015-06-01 13:43:36 +02:00 committed by Takashi Iwai
parent 9120f2de86
commit 8551fe2587

View file

@ -39,7 +39,7 @@ int main(void)
if (frames < 0) if (frames < 0)
frames = snd_pcm_recover(handle, frames, 0); frames = snd_pcm_recover(handle, frames, 0);
if (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; break;
} }
if (frames > 0 && frames < (long)sizeof(buffer)) if (frames > 0 && frames < (long)sizeof(buffer))