aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-11-25 14:16:30 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-11-25 14:16:30 +0000
commit06ed59a1ecc0d74277f3396303461a084600429d (patch)
treed4590b9fc51d5630c2e5089b5556ddba0db64169 /epan
parentc68fddc5e1378570aac7a1dc996981b105b421e8 (diff)
replace free_node_field_info with a macro since it is only called from one other place in the code and this reduces one unnecessary function call overhead.
and it makes ethereal ~1% faster. svn path=/trunk/; revision=9088
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/epan/proto.c b/epan/proto.c
index f84876f852..f486284621 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.113 2003/11/25 14:11:44 sahlberg Exp $
+ * $Id: proto.c,v 1.114 2003/11/25 14:16:30 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -380,13 +380,10 @@ free_node_tree_data(tree_data_t *tree_data)
g_free(tree_data);
}
-static void
-free_node_field_info(field_info* finfo)
-{
- ITEM_LABEL_FREE(finfo->rep);
- FVALUE_FREE(finfo->value);
+#define FREE_NODE_FIELD_INFO(finfo) \
+ ITEM_LABEL_FREE(finfo->rep); \
+ FVALUE_FREE(finfo->value); \
FIELD_INFO_FREE(finfo);
-}
static gboolean
proto_tree_free_node(GNode *node, gpointer data _U_)
@@ -401,7 +398,7 @@ proto_tree_free_node(GNode *node, gpointer data _U_)
else {
/* This is a child GNode. Don't free the per-tree data, but
* do free the field_info data. */
- free_node_field_info(finfo);
+ FREE_NODE_FIELD_INFO(finfo);
}
/* Free the proto_node. */