mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-08 19:55:43 +01:00
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:
parent
819e04c7a1
commit
9b6c5e2d5c
1 changed files with 5 additions and 1 deletions
|
@ -1411,7 +1411,11 @@ static void set_params(void)
|
|||
chunk_size, buffer_size);
|
||||
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)
|
||||
n = chunk_size;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue