mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
clean up some more array iterations
This commit is contained in:
parent
0b98614bea
commit
9b6e504c19
14 changed files with 88 additions and 114 deletions
|
|
@ -88,10 +88,9 @@ static enum spa_bt_feature parse_feature(const char *str)
|
|||
{ "faststream", SPA_BT_FEATURE_FASTSTREAM },
|
||||
{ "a2dp-duplex", SPA_BT_FEATURE_A2DP_DUPLEX },
|
||||
};
|
||||
size_t i;
|
||||
for (i = 0; i < SPA_N_ELEMENTS(feature_keys); ++i) {
|
||||
if (spa_streq(str, feature_keys[i].key))
|
||||
return feature_keys[i].value;
|
||||
SPA_FOR_EACH_ELEMENT_VAR(feature_keys, f) {
|
||||
if (spa_streq(str, f->key))
|
||||
return f->value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue