[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Jan 21 22:45:44 PST 2013


 src/modules/jack/module-jackdbus-detect.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit f26bcae28e1064d7eab48ee0d29a8658ac19acf5
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Tue Jan 22 08:42:27 2013 +0200

    jack: Don't fail module-jackdbus-detect loading if the channels argument is not given.
    
    The u->channels <= 0 check failed if the channels argument was not
    given at all, making the whole module loading fail. I don't think the
    check is necessary at all - negative values are not possible, and if
    someone gives 0 as the argument, it's probably ok if we act as if
    there was no channels argument at all.

diff --git a/src/modules/jack/module-jackdbus-detect.c b/src/modules/jack/module-jackdbus-detect.c
index ba0b364..25ac495 100644
--- a/src/modules/jack/module-jackdbus-detect.c
+++ b/src/modules/jack/module-jackdbus-detect.c
@@ -241,9 +241,7 @@ int pa__init(pa_module *m) {
         goto fail;
     }
 
-    if (pa_modargs_get_value_u32(ma, "channels", &u->channels) < 0 ||
-        u->channels <= 0 ||
-        u->channels > PA_CHANNELS_MAX) {
+    if (pa_modargs_get_value_u32(ma, "channels", &u->channels) < 0 || u->channels > PA_CHANNELS_MAX) {
         pa_log("Failed to parse channels= argument.");
         goto fail;
     }



More information about the pulseaudio-commits mailing list