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.
This commit is contained in:
Tanu Kaskinen 2013-01-22 08:42:27 +02:00
parent a1a0ad1af2
commit f26bcae28e

View file

@ -241,9 +241,7 @@ int pa__init(pa_module *m) {
goto fail; goto fail;
} }
if (pa_modargs_get_value_u32(ma, "channels", &u->channels) < 0 || if (pa_modargs_get_value_u32(ma, "channels", &u->channels) < 0 || u->channels > PA_CHANNELS_MAX) {
u->channels <= 0 ||
u->channels > PA_CHANNELS_MAX) {
pa_log("Failed to parse channels= argument."); pa_log("Failed to parse channels= argument.");
goto fail; goto fail;
} }