[Spice-commits] 2 commits - server/cache-item.tmpl.c server/cursor-channel-client.c server/dcc-private.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 21 07:32:05 UTC 2019


 server/cache-item.tmpl.c       |    6 ------
 server/cursor-channel-client.c |    1 -
 server/dcc-private.h           |    1 -
 3 files changed, 8 deletions(-)

New commits:
commit fce721cbe7cc77ce06ad3e6a2b093c3f0ad3ade7
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat May 25 19:18:24 2019 +0100

    cache-item: Remove unused define
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
index 4639e7b0..40b1ff67 100644
--- a/server/cache-item.tmpl.c
+++ b/server/cache-item.tmpl.c
@@ -24,7 +24,6 @@
 #define CACHE_HASH_SIZE CURSOR_CACHE_HASH_SIZE
 #define FUNC_NAME(name) red_cursor_cache_##name
 #define VAR_NAME(name) cursor_cache_##name
-#define CHANNEL CursorChannel
 #define CHANNELCLIENT CursorChannelClient
 
 #elif defined(CLIENT_PALETTE_CACHE)
@@ -34,7 +33,6 @@
 #define CACHE_HASH_SIZE PALETTE_CACHE_HASH_SIZE
 #define FUNC_NAME(name) red_palette_cache_##name
 #define VAR_NAME(name) palette_cache_##name
-#define CHANNEL DisplayChannel
 #define CHANNELCLIENT DisplayChannelClient
 #else
 
@@ -127,5 +125,4 @@ static void FUNC_NAME(reset)(CHANNELCLIENT *channel_client, long size)
 #undef CACHE_HASH_SIZE
 #undef FUNC_NAME
 #undef VAR_NAME
-#undef CHANNEL
 #undef CHANNELCLIENT
commit 94e1d52ff645918efb98c06a17029e2555ed1064
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat May 25 19:39:26 2019 +0100

    cache-item: Remove only written fields
    
    cursor_cache_items and palette_cache_items where only written
    but never used.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
index 8e18f9b1..4639e7b0 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);
@@ -98,7 +97,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);
@@ -121,7 +119,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 fec26c09..a15f78ce 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 848d4270..0c8efc4b 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;


More information about the Spice-commits mailing list