Re: [PATCH 1/2] Remove useless double conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/26/2016 02:17 PM, Frediano Ziglio wrote:
Avoid converting RedChannelClient* to CursorChannelClient* and then
CursorChannelClient* to RedChannelClient* just to use RedChannelClient*.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/cursor-channel.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index ea5441c..6a0ebff 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -366,11 +366,6 @@ CursorChannel* cursor_channel_new(RedWorker *worker)

 void cursor_channel_client_migrate(RedChannelClient *rcc)
 {
-    CursorChannelClient* client = (CursorChannelClient*)rcc;
-
-    spice_return_if_fail(client);

Please keep
       spice_return_if_fail(rcc);

Or explain why it is safe to remove it.

Ack

Uri.

-    rcc = RED_CHANNEL_CLIENT(client);
-
     red_channel_client_pipe_add_type(rcc, RED_PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE);
     red_channel_client_default_migrate(rcc);
 }


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]