[Spice-devel] [PATCH 06/15] dc: move code inside if
Frediano Ziglio
fziglio at redhat.com
Mon May 16 16:40:31 UTC 2016
these lines are only executed then the condition are satisfied
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/display-channel.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index c5768de..27d8e83 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -517,18 +517,17 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem *
dcc = SPICE_CONTAINEROF(worker_ring_item, DisplayChannelClient,
common.base.channel_link);
if (dpi && dcc == dpi->dcc) {
+ if (dpi_ring_item) {
+ dpi_ring_item = ring_next(&other_drawable->pipes, dpi_ring_item);
+ }
+ worker_ring_item = ring_next(&RED_CHANNEL(display)->clients,
+ worker_ring_item);
break;
}
dcc_prepend_drawable(dcc, drawable);
worker_ring_item = ring_next(&RED_CHANNEL(display)->clients,
worker_ring_item);
}
-
- if (dpi_ring_item) {
- dpi_ring_item = ring_next(&other_drawable->pipes, dpi_ring_item);
- }
- worker_ring_item = ring_next(&RED_CHANNEL(display)->clients,
- worker_ring_item);
}
out_loop:
/* not sending other_drawable where possible */
--
2.7.4
More information about the Spice-devel
mailing list