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@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-05-25 19:39:26 +01:00
parent bf968572d1
commit 94e1d52ff6
3 changed files with 0 additions and 5 deletions

View File

@ -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;
}

View File

@ -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,

View File

@ -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;