clean up some more array iterations

This commit is contained in:
Wim Taymans 2022-09-30 17:23:05 +02:00
parent 0b98614bea
commit 9b6e504c19
14 changed files with 88 additions and 114 deletions

View file

@ -1333,13 +1333,12 @@ static void convert_properties(struct pw_properties *properties)
{ "pipewire.target.node", PW_KEY_NODE_TARGET, }
};
uint32_t i;
const char *str;
for(i = 0; i < SPA_N_ELEMENTS(props); i++) {
if ((str = pw_properties_get(properties, props[i].from)) != NULL) {
pw_properties_set(properties, props[i].to, str);
pw_properties_set(properties, props[i].from, NULL);
SPA_FOR_EACH_ELEMENT_VAR(props, p) {
if ((str = pw_properties_get(properties, p->from)) != NULL) {
pw_properties_set(properties, p->to, str);
pw_properties_set(properties, p->from, NULL);
}
}
}