[Spice-devel] [PATCH 12/15] dc: reuse code inside loop

Frediano Ziglio fziglio at redhat.com
Mon May 16 16:40:37 UTC 2016


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/display-channel.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/server/display-channel.c b/server/display-channel.c
index 40e6608..a54f561 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -515,11 +515,9 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem *
                     dpi = SPICE_CONTAINEROF(dpi_ring_item, RedDrawablePipeItem, base);
                     if (dpi && dcc == dpi->dcc) {
                         dpi_ring_item = ring_next(&other_drawable->pipes, dpi_ring_item);
-                        worker_ring_item = ring_next(&RED_CHANNEL(display)->clients,
-                                                     worker_ring_item);
-                        continue;
+                    } else {
+                        dcc_prepend_drawable(dcc, drawable);
                     }
-                    dcc_prepend_drawable(dcc, drawable);
                     worker_ring_item = ring_next(&RED_CHANNEL(display)->clients,
                                                  worker_ring_item);
                 }
-- 
2.7.4



More information about the Spice-devel mailing list