mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -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
|
|
@ -553,11 +553,10 @@ static const struct object_info *objects[] =
|
|||
|
||||
static const struct object_info *find_info(const char *type, uint32_t version)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < SPA_N_ELEMENTS(objects); i++) {
|
||||
if (spa_streq(objects[i]->type, type) &&
|
||||
objects[i]->version <= version)
|
||||
return objects[i];
|
||||
SPA_FOR_EACH_ELEMENT_VAR(objects, i) {
|
||||
if (spa_streq((*i)->type, type) &&
|
||||
(*i)->version <= version)
|
||||
return *i;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue