[PATCH spice-server 07/13] cache-item: Remove only written fields

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

 



cursor_cache_items and palette_cache_items where only written
but never used.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/cache-item.tmpl.c       | 3 ---
 server/cursor-channel-client.c | 1 -
 server/dcc-private.h           | 1 -
 3 files changed, 5 deletions(-)

diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
index f119a9ee4..6968d20db 100644
--- a/server/cache-item.tmpl.c
+++ b/server/cache-item.tmpl.c
@@ -72,7 +72,6 @@ static void FUNC_NAME(remove)(CHANNELCLIENT *channel_client, RedCacheItem *item)
         now = &(*now)->u.cache_data.next;
     }
     ring_remove(&item->u.cache_data.lru_link);
-    channel_client->priv->VAR_NAME(items)--;
     channel_client->priv->VAR_NAME(available) += item->u.cache_data.size;
 
     red_pipe_item_init(&item->u.pipe_data, RED_PIPE_ITEM_TYPE_INVAL_ONE);
@@ -97,7 +96,6 @@ static int FUNC_NAME(add)(CHANNELCLIENT *channel_client, uint64_t id, size_t siz
         }
         FUNC_NAME(remove)(channel_client, tail);
     }
-    ++channel_client->priv->VAR_NAME(items);
     item->u.cache_data.next = channel_client->priv->CACHE_NAME[(key = CACHE_HASH_KEY(id))];
     channel_client->priv->CACHE_NAME[key] = item;
     ring_item_init(&item->u.cache_data.lru_link);
@@ -120,7 +118,6 @@ static void FUNC_NAME(reset)(CHANNELCLIENT *channel_client, long size)
     }
     ring_init(&channel_client->priv->VAR_NAME(lru));
     channel_client->priv->VAR_NAME(available) = size;
-    channel_client->priv->VAR_NAME(items) = 0;
 }
 
 
diff --git a/server/cursor-channel-client.c b/server/cursor-channel-client.c
index fec26c097..a15f78cee 100644
--- a/server/cursor-channel-client.c
+++ b/server/cursor-channel-client.c
@@ -38,7 +38,6 @@ struct CursorChannelClientPrivate
     RedCacheItem *cursor_cache[CURSOR_CACHE_HASH_SIZE];
     Ring cursor_cache_lru;
     long cursor_cache_available;
-    uint32_t cursor_cache_items;
 };
 
 G_DEFINE_TYPE_WITH_PRIVATE(CursorChannelClient, cursor_channel_client,
diff --git a/server/dcc-private.h b/server/dcc-private.h
index 848d42702..0c8efc4b6 100644
--- a/server/dcc-private.h
+++ b/server/dcc-private.h
@@ -44,7 +44,6 @@ struct DisplayChannelClientPrivate
     RedCacheItem *palette_cache[PALETTE_CACHE_HASH_SIZE];
     Ring palette_cache_lru;
     long palette_cache_available;
-    uint32_t palette_cache_items;
 
     struct {
         FreeList free_list;
-- 
2.20.1

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




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