[PATCH 2/2] Simplify DisplayChannel hold_item()

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

 



Since all pipe items implement refcounting now, just call
red_pipe_item_ref() and eliminate the switch statement.
---
 server/display-channel.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/server/display-channel.c b/server/display-channel.c
index 1487f10..3f414fd 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -1934,16 +1934,7 @@ static void hold_item(RedChannelClient *rcc, RedPipeItem *item)
 {
     spice_return_if_fail(item);
 
-    switch (item->type) {
-    case RED_PIPE_ITEM_TYPE_DRAW:
-    case RED_PIPE_ITEM_TYPE_IMAGE:
-    case RED_PIPE_ITEM_TYPE_STREAM_CLIP:
-    case RED_PIPE_ITEM_TYPE_UPGRADE:
-        red_pipe_item_ref(item);
-        break;
-    default:
-        spice_warn_if_reached();
-    }
+    red_pipe_item_ref(item);
 }
 
 static int handle_migrate_flush_mark(RedChannelClient *rcc)
-- 
2.4.11

_______________________________________________
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]