[Spice-commits] server/red-qxl.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Aug 31 16:56:37 UTC 2017
server/red-qxl.c | 14 --------------
1 file changed, 14 deletions(-)
New commits:
commit 1985b917bdfefa5a0a48e5d7af4738484753a1ba
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Aug 25 11:10:41 2017 +0100
red-qxl: Remove redundant checks
A RedChannelClient is always attached to a valid RedChannel.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/red-qxl.c b/server/red-qxl.c
index 6ad8f6a5..b556428d 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -101,10 +101,6 @@ static void red_qxl_disconnect_display_peer(RedChannelClient *rcc)
Dispatcher *dispatcher;
RedChannel *channel = red_channel_client_get_channel(rcc);
- if (!channel) {
- return;
- }
-
dispatcher = (Dispatcher *)g_object_get_data(G_OBJECT(channel), "dispatcher");
spice_printerr("");
@@ -124,9 +120,6 @@ static void red_qxl_display_migrate(RedChannelClient *rcc)
RedChannel *channel = red_channel_client_get_channel(rcc);
uint32_t type, id;
- if (!channel) {
- return;
- }
g_object_get(channel, "channel-type", &type, "id", &id, NULL);
dispatcher = (Dispatcher *)g_object_get_data(G_OBJECT(channel), "dispatcher");
spice_printerr("channel type %u id %u", type, id);
@@ -161,10 +154,6 @@ static void red_qxl_disconnect_cursor_peer(RedChannelClient *rcc)
Dispatcher *dispatcher;
RedChannel *channel = red_channel_client_get_channel(rcc);
- if (!channel) {
- return;
- }
-
dispatcher = (Dispatcher *)g_object_get_data(G_OBJECT(channel), "dispatcher");
spice_printerr("");
payload.rcc = rcc;
@@ -181,9 +170,6 @@ static void red_qxl_cursor_migrate(RedChannelClient *rcc)
RedChannel *channel = red_channel_client_get_channel(rcc);
uint32_t type, id;
- if (!channel) {
- return;
- }
g_object_get(channel, "channel-type", &type, "id", &id, NULL);
dispatcher = (Dispatcher *)g_object_get_data(G_OBJECT(channel), "dispatcher");
spice_printerr("channel type %u id %u", type, id);
More information about the Spice-commits
mailing list