[Spice-devel] [PATCH 1/2] Remove unnecessary cursor_pipe_item_ref()

Jonathon Jongsma jjongsma at redhat.com
Thu May 19 19:05:37 UTC 2016


Use the base red_pipe_item_ref() instead of adding an additional static
wrapper function.
---
 server/cursor-channel.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index c0b2fda..fa462c5 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -340,23 +340,11 @@ static void cursor_channel_send_item(RedChannelClient *rcc, RedPipeItem *pipe_it
     red_channel_client_begin_send_message(rcc);
 }
 
-static RedCursorPipeItem *cursor_pipe_item_ref(RedCursorPipeItem *item)
-{
-    spice_return_val_if_fail(item, NULL);
-
-    red_pipe_item_ref(item);
-    return item;
-}
-
-
 static void cursor_channel_hold_pipe_item(RedChannelClient *rcc, RedPipeItem *item)
 {
-    RedCursorPipeItem *cursor_pipe_item;
-
     spice_return_if_fail(item);
 
-    cursor_pipe_item = SPICE_CONTAINEROF(item, RedCursorPipeItem, base);
-    cursor_pipe_item_ref(cursor_pipe_item);
+    red_pipe_item_ref(item);
 }
 
 CursorChannel* cursor_channel_new(RedWorker *worker)
-- 
2.4.11



More information about the Spice-devel mailing list