mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-07 09:48:48 +00:00
Use a macro to simplify ring_get_length
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
57570953dc
commit
15b8f28c14
@ -155,9 +155,7 @@ static inline unsigned int ring_get_length(Ring *ring)
|
||||
RingItem *i;
|
||||
unsigned int ret = 0;
|
||||
|
||||
for (i = ring_get_head(ring);
|
||||
i != NULL;
|
||||
i = ring_next(ring, i))
|
||||
RING_FOREACH(i, ring)
|
||||
ret++;
|
||||
|
||||
return ret;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user