[Spice-devel] [PATCH spice-server] Remove useless check

Frediano Ziglio fziglio at redhat.com
Fri Apr 28 12:13:20 UTC 2017


rcc is just used on the next line so cannot be NULL.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red-channel-client.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index 802cd46..2dc0b8f 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -1659,9 +1659,7 @@ static void red_channel_client_pipe_clear(RedChannelClient *rcc)
 {
     RedPipeItem *item;
 
-    if (rcc) {
-        red_channel_client_clear_sent_item(rcc);
-    }
+    red_channel_client_clear_sent_item(rcc);
     while ((item = g_queue_pop_head(&rcc->priv->pipe)) != NULL) {
         red_pipe_item_unref(item);
     }
-- 
2.9.3



More information about the Spice-devel mailing list