]> code.delx.au - pulseaudio/commitdiff
alsa: Set return code before printing it.
authorDylan Reid <dgreid@chromium.org>
Wed, 26 Oct 2011 03:34:31 +0000 (20:34 -0700)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 26 Oct 2011 14:19:45 +0000 (16:19 +0200)
The error message for snd_pcm_hw_params_set_period_wakeup was
printing "ret", but "ret" wasn't being set.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
src/modules/alsa/alsa-util.c

index f05417855578ccbd508571fe9406a1625db63587..e5275b10d8fbabb49f57237c2deb8920ff256abc 100644 (file)
@@ -255,7 +255,7 @@ int pa_alsa_set_hw_params(
         /* try to disable period wakeups if hardware can do so */
         if (snd_pcm_hw_params_can_disable_period_wakeup(hwparams)) {
 
-            if (snd_pcm_hw_params_set_period_wakeup(pcm_handle, hwparams, FALSE) < 0)
+            if ((ret = snd_pcm_hw_params_set_period_wakeup(pcm_handle, hwparams, FALSE)) < 0)
                 /* don't bail, keep going with default mode with period wakeups */
                 pa_log_debug("snd_pcm_hw_params_set_period_wakeup() failed: %s", pa_alsa_strerror(ret));
             else