pipewire: conf: initialize return value

In some cases it is possible for `pw_context_conf_section_for_each()`
to not set `res` at all, which leads to an indeterminate value being returned.

Fix that by setting `res` to 0 initially.
This commit is contained in:
Barnabás Pőcze 2022-02-15 10:00:04 +01:00
parent 2e3c749a01
commit 762a523098

View file

@ -836,7 +836,7 @@ int pw_context_conf_section_for_each(struct pw_context *context, const char *sec
struct pw_properties *conf = context->conf;
const char *path = NULL;
const struct spa_dict_item *it;
int res;
int res = 0;
spa_dict_for_each(it, &conf->dict) {
if (spa_strendswith(it->key, "config.path")) {