From 05d8d0c76f801027da9ed58a89f4245c98ad44a6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 3 Oct 2005 22:17:32 +0000 Subject: A hash table doesn't *have* to have a value destroy function - and, in fact, in GLib 1.2, it *can't* have one. As the value destroy function for this hash table does nothing, don't bother with it - and create the hash table with "g_hash_table_new(), rather than "g_hash_table_new_full()", so it works with GLib 1.2[.x]. svn path=/trunk/; revision=16096 --- epan/stream.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'epan/stream.c') diff --git a/epan/stream.c b/epan/stream.c index 3e72efe8d5..0102068196 100644 --- a/epan/stream.c +++ b/epan/stream.c @@ -4,7 +4,7 @@ * which are handled as streams, and don't have lengths * and IDs such as are required for reassemble.h * - * $Id: stream.c,v 1.9 2005/07/27 22:47:55 richardv Exp $ + * $Id$ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -124,17 +124,6 @@ gboolean stream_compare_func(gconstpointer a, return (key1 -> circ.conv == key2 -> circ.conv ); } -/* value destroy func */ -void stream_value_destroy_func(gpointer v) -{ - stream_t *val = (stream_t *)v; - - /* this is only called when the entire hash (and hence the entire - * "streams" GMemChunk is being freed, so there is no need to free - * v. - */ -} - /* memory pools */ static GMemChunk *stream_keys = NULL; static GMemChunk *streams = NULL; @@ -169,10 +158,8 @@ static void init_stream_hash( void ) { MEMCHUNK_STREAM_COUNT, G_ALLOC_ONLY); - stream_hash = g_hash_table_new_full(stream_hash_func, - stream_compare_func, - NULL, - stream_value_destroy_func); + stream_hash = g_hash_table_new(stream_hash_func, + stream_compare_func); } -- cgit v1.2.3