aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2012-01-14 03:21:28 +0000
committerJörg Mayer <jmayer@loplof.de>2012-01-14 03:21:28 +0000
commit71520b8759f04c4e7fbcef87cf9674115a80bd62 (patch)
tree6f17c27816e9d39697285bcebf6f20062b4550b0 /epan/proto.c
parent5d542b79d5ddd60456f5d0a6c799b51d54a99581 (diff)
Remove obsolete GLIB_CHECK_VERSION(2,10,0) checks
svn path=/trunk/; revision=40490
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 6ccac1de57..659fb135cb 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -260,14 +260,7 @@ struct _protocol {
/* List of all protocols */
static GList *protocols = NULL;
-#define INITIAL_NUM_PROTOCOL_HFINFO 1500
-
-/* Contains information about protocols and header fields. Used when
- * dissectors register their data */
-#if GLIB_CHECK_VERSION(2,10,0)
-#else
-static GMemChunk *gmc_hfinfo = NULL;
-#endif
+#define INITIAL_NUM_PROTOCOL_HFINFO 1500
/* Contains information about a field when a dissector calls
* proto_tree_add_item. */
@@ -365,14 +358,6 @@ proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_da
proto_short_names = g_hash_table_new(wrs_str_hash, g_str_equal);
proto_filter_names = g_hash_table_new(wrs_str_hash, g_str_equal);
-#if GLIB_CHECK_VERSION(2,10,0)
-#else
- gmc_hfinfo = g_mem_chunk_new("gmc_hfinfo",
- sizeof(header_field_info),
- INITIAL_NUM_PROTOCOL_HFINFO * sizeof(header_field_info),
- G_ALLOC_ONLY);
-#endif
-
gpa_hfinfo.len=0;
gpa_hfinfo.allocated_len=0;
gpa_hfinfo.hfi=NULL;
@@ -450,12 +435,7 @@ proto_cleanup(void)
PROTO_REGISTRAR_GET_NTH(protocol->proto_id, hfinfo);
DISSECTOR_ASSERT(protocol->proto_id == hfinfo->id);
-#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free(header_field_info, hfinfo);
-#else
- g_mem_chunk_free(gmc_hfinfo, hfinfo);
-#endif
-
g_list_free(protocol->fields);
protocols = g_list_remove(protocols, protocol);
g_free(protocol);
@@ -476,14 +456,6 @@ proto_cleanup(void)
proto_filter_names = NULL;
}
-#if GLIB_CHECK_VERSION(2,10,0)
-#else
- if (gmc_hfinfo) {
- g_mem_chunk_destroy(gmc_hfinfo);
- gmc_hfinfo = NULL;
- }
-#endif
-
if(gpa_hfinfo.allocated_len){
gpa_hfinfo.len=0;
gpa_hfinfo.allocated_len=0;
@@ -4435,11 +4407,7 @@ proto_register_protocol(const char *name, const char *short_name,
protocols = g_list_prepend(protocols, protocol);
/* Here we do allocate a new header_field_info struct */
-#if GLIB_CHECK_VERSION(2,10,0)
hfinfo = g_slice_new(header_field_info);
-#else
- hfinfo = g_mem_chunk_alloc(gmc_hfinfo);
-#endif
hfinfo->name = name;
hfinfo->abbrev = filter_name;
hfinfo->type = FT_PROTOCOL;