[pulseaudio-discuss] [PATCH 1/3] alsa-util: fix parenthesis position in err assignment

Boris Egorov egorov at linux.com
Mon Jan 12 09:52:10 PST 2015


Issue detected by CppCheck and PVS Studio
---
 src/modules/alsa/alsa-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 4131cff..a9469c0 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -443,7 +443,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min, bool peri
 
     snd_pcm_sw_params_alloca(&swparams);
 
-    if ((err = snd_pcm_sw_params_current(pcm, swparams) < 0)) {
+    if ((err = snd_pcm_sw_params_current(pcm, swparams)) < 0) {
         pa_log_warn("Unable to determine current swparams: %s\n", pa_alsa_strerror(err));
         return err;
     }
-- 
2.1.4



More information about the pulseaudio-discuss mailing list