aboutsummaryrefslogtreecommitdiffstats
path: root/epan/stream.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-10-03 22:17:32 +0000
committerGuy Harris <guy@alum.mit.edu>2005-10-03 22:17:32 +0000
commit05d8d0c76f801027da9ed58a89f4245c98ad44a6 (patch)
treee428cec0ae782f59485224bb6ea3130207d774c0 /epan/stream.c
parenta9f5f31c180e9092abfbd1c25a9076e6bf097e70 (diff)
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
Diffstat (limited to 'epan/stream.c')
-rw-r--r--epan/stream.c19
1 files changed, 3 insertions, 16 deletions
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 <gerald@ethereal.com>
@@ -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);
}