[Spice-devel] [PATCH 3/3] Use a macro to simplify ring_get_length
Christophe Fergeau
cfergeau at redhat.com
Tue Jun 21 11:38:36 UTC 2016
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Tue, Jun 21, 2016 at 10:27:00AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> common/ring.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/common/ring.h b/common/ring.h
> index b13bc7d..4b0e313 100644
> --- a/common/ring.h
> +++ b/common/ring.h
> @@ -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;
> --
> 2.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160621/865cb0e5/attachment.sig>
More information about the Spice-devel
mailing list