dc: if link is NULL jumping outside loop will check variable and exit

The outer loop will exit too.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-05-14 13:54:01 +01:00
parent 9a85e3cf34
commit 0010656ea4

View File

@ -481,7 +481,7 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem *
while (link) {
for (;;) {
if (!link) {
goto out_loop;
break;
}
dcc = link->data;
dpi = SPICE_UPCAST(RedDrawablePipeItem, dpi_ring_item);
@ -494,7 +494,6 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem *
link = link->next;
}
}
out_loop:
/* not sending other_drawable where possible */
drawable_remove_from_pipes(other_drawable);