[Spice-commits] server/dcc-send.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Sep 16 08:15:04 UTC 2016


 server/dcc-send.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 5ccad5691533086c221adfe120370b6d3519d563
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Sep 15 23:53:45 2016 +0100

    Simplify some boolean arithmetic
    
    Pass boolean directly.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/dcc-send.c b/server/dcc-send.c
index 521e6a2..cc027c5 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -147,11 +147,7 @@ static int is_bitmap_lossy(RedChannelClient *rcc, SpiceImage *image, SpiceRect *
         out_data->id = image->descriptor.id;
         if (dcc_pixmap_cache_hit(dcc, image->descriptor.id, &is_hit_lossy)) {
             out_data->type = BITMAP_DATA_TYPE_CACHE;
-            if (is_hit_lossy) {
-                return TRUE;
-            } else {
-                return FALSE;
-            }
+            return is_hit_lossy;
         } else {
             out_data->type = BITMAP_DATA_TYPE_BITMAP_TO_CACHE;
         }
@@ -166,13 +162,8 @@ static int is_bitmap_lossy(RedChannelClient *rcc, SpiceImage *image, SpiceRect *
     out_data->type = BITMAP_DATA_TYPE_SURFACE;
     out_data->id = image->u.surface.surface_id;
 
-    if (is_surface_area_lossy(dcc, out_data->id,
-                              area, &out_data->lossy_rect))
-    {
-        return TRUE;
-    } else {
-        return FALSE;
-    }
+    return is_surface_area_lossy(dcc, out_data->id,
+                                 area, &out_data->lossy_rect);
 }
 
 static int is_brush_lossy(RedChannelClient *rcc, SpiceBrush *brush,


More information about the Spice-commits mailing list