On Wed, 2015-11-25 at 15:27 +0000, Frediano Ziglio wrote:
> From: Marc-André Lureau <marcandre.lur...@gmail.com>
> 
> ---
>  server/display-channel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 1496f07..cffd6fa 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -1344,8 +1344,8 @@ void display_channel_draw_till(DisplayChannel *display,
> const SpiceRect *area, i
>      Drawable *now;
>      QRegion rgn;
>  
> -    spice_assert(last);
> -    spice_assert(ring_item_is_linked(&last->list_link));
> +    spice_return_if_fail(last);
> +    spice_return_if_fail(ring_item_is_linked(&last->list_link));
>  
>      surface = &display->surfaces[surface_id];
>  


Changing these to early return here seems fine. The caller doesn't depend on any
side-effects from calling this function.

Reviewed-by: Jonathon Jongsma <jjong...@redhat.com>
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to