aplay: check the return value for snd_pcm_sw_params_current() (coverity)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-03-13 14:22:22 +01:00
parent 819e04c7a1
commit 9b6c5e2d5c

View file

@ -1411,7 +1411,11 @@ static void set_params(void)
chunk_size, buffer_size); chunk_size, buffer_size);
prg_exit(EXIT_FAILURE); prg_exit(EXIT_FAILURE);
} }
snd_pcm_sw_params_current(handle, swparams); err = snd_pcm_sw_params_current(handle, swparams);
if (err < 0) {
error(_("Unable to get current sw params."));
prg_exit(EXIT_FAILURE);
}
if (avail_min < 0) if (avail_min < 0)
n = chunk_size; n = chunk_size;
else else