module-raop: fix warning on uninitialised res variable

This commit is contained in:
Wim Taymans 2023-05-01 09:59:55 +02:00
parent 0bb0b524c7
commit c23c27b566

View file

@ -1902,10 +1902,13 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
impl->context = context;
impl->loop = pw_context_get_main_loop(context);
if ((ip = pw_properties_get(props, "raop.ip")) == NULL)
goto error;
if ((port = pw_properties_get(props, "raop.port")) == NULL)
ip = pw_properties_get(props, "raop.ip");
port = pw_properties_get(props, "raop.port");
if (ip == NULL || port == NULL) {
pw_log_error("Missing raop.ip or raop.port");
res = -EINVAL;
goto error;
}
if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");