From cebd67e88b319726bcd5da938dd6bc758baa1e85 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 5 Aug 2020 12:26:26 +0200 Subject: [PATCH] properties: use the _for_each iterator --- src/pipewire/properties.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pipewire/properties.c b/src/pipewire/properties.c index cf6156bd8..c80f01256 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; }