From 5fbac6c8cbd7d79971a0c547d93a442fefabcf49 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Sat, 14 May 2016 13:55:14 +0100 Subject: [PATCH] dc: use while again Convert from for(;;) { if () break; ... } to while Signed-off-by: Frediano Ziglio --- server/display-channel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index ef2b28d0..574ba57d 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -479,10 +479,7 @@ static int current_add_equal(DisplayChannel *display, DrawItem *item, TreeItem * dpi_ring_item = ring_get_head(&other_drawable->pipes); /* dpi contains a sublist of dcc's, ordered the same */ while (link) { - for (;;) { - if (!link) { - break; - } + while (link) { dcc = link->data; dpi = SPICE_UPCAST(RedDrawablePipeItem, dpi_ring_item); if (dpi && dcc == dpi->dcc) {