From f26bcae28e1064d7eab48ee0d29a8658ac19acf5 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Tue, 22 Jan 2013 08:42:27 +0200 Subject: [PATCH] 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. --- src/modules/jack/module-jackdbus-detect.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/jack/module-jackdbus-detect.c b/src/modules/jack/module-jackdbus-detect.c index ba0b364c3..25ac4950b 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; }