Re: [PATCH 01/19] worker: changed some spice_assert in display_channel_draw_till

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

 



On Wed, 2015-11-25 at 15:27 +0000, Frediano Ziglio wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> 
> ---
>  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 <jjongsma@xxxxxxxxxx>
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]