diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2016-08-02 10:09:37 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2016-08-02 10:24:12 +0100 |
commit | f27ee4c0db98599c6aacef833de061c314e0c234 (patch) | |
tree | 0114f4cd8b03759beee4913dd273c3f4797bf9c6 | |
parent | 777a4c4987cd657c7d0f463e615905e6263b2a2b (diff) |
Reduce indentation inverting condition
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-rw-r--r-- | server/stream.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/server/stream.c b/server/stream.c index d1f92c30..96aca558 100644 --- a/server/stream.c +++ b/server/stream.c @@ -250,20 +250,19 @@ static bool is_next_stream_frame(DisplayChannel *display, return FALSE; } } else { - if (rect_contains(&red_drawable->bbox, other_dest)) { - int candidate_area = rect_get_area(&red_drawable->bbox); - int other_area = rect_get_area(other_dest); - /* do not stream drawables that are significantly - * bigger than the original frame */ - if (candidate_area > 2 * other_area) { - spice_debug("too big candidate:"); - spice_debug("prev box ==>"); - rect_debug(other_dest); - spice_debug("new box ==>"); - rect_debug(&red_drawable->bbox); - return FALSE; - } - } else { + if (!rect_contains(&red_drawable->bbox, other_dest)) { + return FALSE; + } + int candidate_area = rect_get_area(&red_drawable->bbox); + int other_area = rect_get_area(other_dest); + /* do not stream drawables that are significantly + * bigger than the original frame */ + if (candidate_area > 2 * other_area) { + spice_debug("too big candidate:"); + spice_debug("prev box ==>"); + rect_debug(other_dest); + spice_debug("new box ==>"); + rect_debug(&red_drawable->bbox); return FALSE; } } |