Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for SLE-Module-Transactional-Server:aarch64
openSUSE:Leap:42.1
alsa
0016-pcm-Remove-assert-from-snd_pcm_hw_params_s...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0016-pcm-Remove-assert-from-snd_pcm_hw_params_slave.patch of Package alsa
From 67f73b0fab466e780dcc0442e19894a1cbedc43b Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@suse.de> Date: Thu, 21 May 2015 07:26:39 +0200 Subject: [PATCH 16/16] pcm: Remove assert() from snd_pcm_hw_params_slave() Using assert() for non-fatal error checks is really brain-dead. These are especially bad, as it hits even in the normal operation with plugins and some h/w constraints. Reported-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de> --- src/pcm/pcm_params.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pcm/pcm_params.c b/src/pcm/pcm_params.c index 6e57904e445b..1d667a583151 100644 --- a/src/pcm/pcm_params.c +++ b/src/pcm/pcm_params.c @@ -2244,9 +2244,11 @@ int snd_pcm_hw_params_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_hw_params_t slave_params; int err; err = sprepare(pcm, &slave_params); - assert(err >= 0); + if (err < 0) + return err; err = schange(pcm, params, &slave_params); - assert(err >= 0); + if (err < 0) + return err; err = sparams(pcm, &slave_params); if (err < 0) cchange(pcm, params, &slave_params); -- 2.4.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor