mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
2e3c749a01
commit
762a523098
1 changed files with 1 additions and 1 deletions
|
|
@ -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")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue