[Spice-devel] [PATCH spice-server v2] spicevmc: Remove useless check
Frediano Ziglio
fziglio at redhat.com
Wed May 3 10:21:09 UTC 2017
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 rcc pointer to be valid.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/spicevmc.c | 4 ----
1 file changed, 4 deletions(-)
Changes since v1:
- explain why the pointer cannot be NULL.
diff --git a/server/spicevmc.c b/server/spicevmc.c
index 83f4a76..34d5c6e 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 */
--
2.9.3
More information about the Spice-devel
mailing list