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

Frediano Ziglio fziglio at redhat.com
Thu Nov 19 09:59:19 PST 2015


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;
 
-- 
2.4.3



More information about the Spice-devel mailing list