[spice-gtk v1] channel-display: always name GHashFunc and GEqualFunc

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

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

g_hash_table_new() allows to pass NULL for GHashFunc and GEqualFunc
which defaults to g_direct_hash() and g_direct_equal().

This is the only place in our code that uses NULL while in
channel-main and channel-smartcard and spice-file-transfer-task we
name it.

Changing for consistency and clarity.

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 src/channel-display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/channel-display.c b/src/channel-display.c
index 589ba45..0f094d5 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -907,7 +907,7 @@ static void spice_display_channel_init(SpiceDisplayChannel *channel)
 
     c = channel->priv = SPICE_DISPLAY_CHANNEL_GET_PRIVATE(channel);
 
-    c->surfaces = g_hash_table_new_full(NULL, NULL, NULL, destroy_surface);
+    c->surfaces = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_surface);
     c->image_cache.ops = &image_cache_ops;
     c->palette_cache.ops = &palette_cache_ops;
     c->image_surfaces.ops = &image_surfaces_ops;
-- 
2.16.2

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