mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pod: don't iterate 0 sized children
That will just create and endless loop and because the child has no size, there is not really anything to iterate.
This commit is contained in:
parent
a00981ec20
commit
b029a2ce05
1 changed files with 2 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ static inline struct spa_pod_control *spa_pod_control_next(const struct spa_pod_
|
|||
|
||||
#define SPA_POD_ARRAY_BODY_FOREACH(body, _size, iter) \
|
||||
for ((iter) = (__typeof__(iter))SPA_PTROFF((body), sizeof(struct spa_pod_array_body), void); \
|
||||
spa_ptrinside(body, _size, iter, (body)->child.size, NULL); \
|
||||
(body)->child.size > 0 && spa_ptrinside(body, _size, iter, (body)->child.size, NULL); \
|
||||
(iter) = (__typeof__(iter))SPA_PTROFF((iter), (body)->child.size, void))
|
||||
|
||||
#define SPA_POD_ARRAY_FOREACH(obj, iter) \
|
||||
|
|
@ -87,7 +87,7 @@ static inline struct spa_pod_control *spa_pod_control_next(const struct spa_pod_
|
|||
|
||||
#define SPA_POD_CHOICE_BODY_FOREACH(body, _size, iter) \
|
||||
for ((iter) = (__typeof__(iter))SPA_PTROFF((body), sizeof(struct spa_pod_choice_body), void); \
|
||||
spa_ptrinside(body, _size, iter, (body)->child.size, NULL); \
|
||||
(body)->child.size > 0 && spa_ptrinside(body, _size, iter, (body)->child.size, NULL); \
|
||||
(iter) = (__typeof__(iter))SPA_PTROFF((iter), (body)->child.size, void))
|
||||
|
||||
#define SPA_POD_CHOICE_FOREACH(obj, iter) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue