summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-09-15 23:53:45 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-09-16 09:14:24 +0100
commit5ccad5691533086c221adfe120370b6d3519d563 (patch)
tree3146e814e435d38154b0c0b59f4ec030767b53e1
parentb6cbb26e25e52440c01bf070c4630af1b37a50fb (diff)
Simplify some boolean arithmetic
Pass boolean directly. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
-rw-r--r--server/dcc-send.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/server/dcc-send.c b/server/dcc-send.c
index 521e6a2f..cc027c55 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,