[Spice-devel] [PATCH 2/2] worker: change spice_assert in dcc_free_glz_drawable_instance

Pavel Grunt pgrunt at redhat.com
Fri Nov 20 01:38:59 PST 2015


NACK, I don't see a reason for changing it.

Pavel

On Thu, 2015-11-19 at 17:59 +0000, Frediano Ziglio wrote:
> From: Marc-André Lureau <marcandre.lureau at gmail.com>
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/dcc-encoders.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
> index 1f98d1a..1156513 100644
> --- a/server/dcc-encoders.c
> +++ b/server/dcc-encoders.c
> @@ -438,13 +438,13 @@ void dcc_free_glz_drawable_instance(DisplayChannelClient
> *dcc,
>      RedWorker *worker = display_channel->common.worker;
>      RedGlzDrawable *glz_drawable;
>  
> -    spice_assert(instance);
> -    spice_assert(instance->glz_drawable);
> +    spice_return_if_fail(instance);
> +    spice_return_if_fail(instance->glz_drawable);
>  
>      glz_drawable = instance->glz_drawable;
>  
> -    spice_assert(glz_drawable->dcc == dcc);
> -    spice_assert(glz_drawable->instances_count > 0);
> +    spice_return_if_fail(glz_drawable->dcc == dcc);
> +    spice_return_if_fail(glz_drawable->instances_count > 0);
>  
>      ring_remove(&instance->glz_link);
>      glz_drawable->instances_count--;
> @@ -456,7 +456,7 @@ void dcc_free_glz_drawable_instance(DisplayChannelClient
> *dcc,
>      }
>  
>      if (ring_is_empty(&glz_drawable->instances)) {
> -        spice_assert(glz_drawable->instances_count == 0);
> +        spice_return_if_fail(glz_drawable->instances_count == 0);
>  
>          Drawable *drawable = glz_drawable->drawable;
>  


More information about the Spice-devel mailing list