[Spice-devel] [PATCH spice-server] stream: Simplify FOREACH_STREAMS macro
Christophe de Dinechin
cdupontd at redhat.com
Wed Sep 13 09:42:12 UTC 2017
> On 13 Sep 2017, at 11:20, Frediano Ziglio <fziglio at redhat.com> wrote:
>
> This macro is exactly doing what RING_FOREACH just passing streams
> ring.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/stream.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/server/stream.c b/server/stream.c
> index 0148d1eda..51dfc8847 100644
> --- a/server/stream.c
> +++ b/server/stream.c
> @@ -25,9 +25,7 @@
>
> #define FPS_TEST_INTERVAL 1
> #define FOREACH_STREAMS(display, item) \
> - for (item = ring_get_head(&(display)->priv->streams); \
> - item != NULL; \
> - item = ring_next(&(display)->priv->streams, item))
> + RING_FOREACH(item, &(display)->priv->streams)
Ack
>
> static void stream_agent_stats_print(StreamAgent *agent)
> {
> --
> 2.13.5
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list