diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-08-05 12:26:26 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-08-05 12:26:26 +0200 |
commit | cebd67e88b319726bcd5da938dd6bc758baa1e85 (patch) | |
tree | fcdc01c2c995926e85bdf21d26dcc59b2a4e4eb4 | |
parent | 9290137931edbc40d073cdd8be5752e088f5fd58 (diff) |
properties: use the _for_each iterator
-rw-r--r-- | src/pipewire/properties.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pipewire/properties.c b/src/pipewire/properties.c index cf6156bd..c80f0125 100644 --- a/src/pipewire/properties.c +++ b/src/pipewire/properties.c @@ -263,11 +263,11 @@ SPA_EXPORT int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict) { - uint32_t i; + const struct spa_dict_item *it; int changed = 0; - for (i = 0; i < dict->n_items; i++) - changed += pw_properties_set(props, dict->items[i].key, dict->items[i].value); + spa_dict_for_each(it, dict) + changed += pw_properties_set(props, it->key, it->value); return changed; } |