[Spice-devel] [PATCH 09/15] dc: if worker_ring_item is NULL jumping outside loop will check variable and exit
Frediano Ziglio
fziglio at redhat.com
Mon May 16 16:40:34 UTC 2016
The outer loop will exit too.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/display-channel.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index cb60637..312d971 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -511,7 +511,7 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem *
while (worker_ring_item) {
for (;;) {
if (!worker_ring_item) {
- goto out_loop;
+ break;
}
dcc = SPICE_CONTAINEROF(worker_ring_item, DisplayChannelClient,
common.base.channel_link);
@@ -527,7 +527,6 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem *
worker_ring_item);
}
}
-out_loop:
/* not sending other_drawable where possible */
drawable_remove_from_pipes(other_drawable);
--
2.7.4
More information about the Spice-devel
mailing list