[Spice-commits] server/spicevmc.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Wed May 3 11:35:41 UTC 2017


 server/spicevmc.c |    4 ----
 1 file changed, 4 deletions(-)

New commits:
commit 1b9cf935b78bf44b23f3744384dba225ea52da67
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Wed Nov 2 07:53:43 2016 +0000

    spicevmc: Remove useless check
    
    rcc is already deferenced in red_channel_client_get_client so
    checking for NULL after that is uselss.
    
    Also this call is generated from red_channel_client_disconnect
    which requires the rcc pointer to be valid.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/spicevmc.c b/server/spicevmc.c
index 83f4a760..34d5c6e4 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -482,10 +482,6 @@ static void spicevmc_red_channel_client_on_disconnect(RedChannelClient *rcc)
     SpiceCharDeviceInterface *sif;
     RedClient *client = red_channel_client_get_client(rcc);
 
-    if (!rcc) {
-        return;
-    }
-
     channel = RED_VMC_CHANNEL(red_channel_client_get_channel(rcc));
 
     /* partial message which wasn't pushed to device */


More information about the Spice-commits mailing list