Re: [PATCH spice-server] stream: Simplify FOREACH_STREAMS macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 13 Sep 2017, at 11:20, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:
> 
> This macro is exactly doing what RING_FOREACH just passing streams
> ring.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]