[Spice-commits] src/channel-display.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Thu Apr 19 06:58:44 UTC 2018


 src/channel-display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 03b829dd47368d1a1314abead70ccce4bee27bb3
Author: Victor Toso <me at victortoso.com>
Date:   Thu Apr 19 06:54:09 2018 +0200

    channel-display: always name GHashFunc and GEqualFunc
    
    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 at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/channel-display.c b/src/channel-display.c
index 5329ed0..95bd39a 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -862,7 +862,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;


More information about the Spice-commits mailing list