[Spice-devel] [PATCH] server: Fix the order of the attach_stream() asserts

Jonathon Jongsma jjongsma at redhat.com
Thu Mar 3 20:46:48 UTC 2016


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

On Thu, 2016-03-03 at 21:22 +0100, Francois Gouget wrote:
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> 
> I assume the reason for having two asserts is to help with diagnosis so 
> I did not merge them.
> 
>  server/stream.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/stream.c b/server/stream.c
> index 2bfb993..f1edec7 100644
> --- a/server/stream.c
> +++ b/server/stream.c
> @@ -263,8 +263,8 @@ static void attach_stream(DisplayChannel *display,
> Drawable *drawable, Stream *s
>      DisplayChannelClient *dcc;
>      RingItem *item, *next;
>  
> -    spice_assert(!drawable->stream && !stream->current);
>      spice_assert(drawable && stream);
> +    spice_assert(!drawable->stream && !stream->current);
>      stream->current = drawable;
>      drawable->stream = stream;
>      stream->last_time = drawable->creation_time;


More information about the Spice-devel mailing list