]> code.delx.au - pulseaudio/commitdiff
jack: Don't fail module-jackdbus-detect loading if the channels argument is not given.
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 22 Jan 2013 06:42:27 +0000 (08:42 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 22 Jan 2013 06:42:27 +0000 (08:42 +0200)
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.

src/modules/jack/module-jackdbus-detect.c

index ba0b364c325f332f5411f379d925dee6441bd344..25ac4950b1a3e8a7f40329f7c133c4a14ee29b19 100644 (file)
@@ -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;
     }