aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-12-03 09:50:40 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-12-03 09:50:40 +0000
commit5ff0237060f1b93f5efe8e4041bbde2a2f674cbe (patch)
tree7eb2780a520c46705e1065d50ef30e9c7d58eed4 /epan/proto.c
parentdcd98ae8d334081d0b4e0f4c6902ac128dfeb000 (diff)
performance update
replace tvb_raw_offset() which is essentially a simple assignment and which is called a lot with a macro. this makes my tethereal testcase 2-3% faster. svn path=/trunk/; revision=9152
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 9d215e8ccf..52fb49f5c7 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.122 2003/12/03 09:28:22 guy Exp $
+ * $Id: proto.c,v 1.123 2003/12/03 09:50:40 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1884,9 +1884,7 @@ alloc_field_info(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
fi->hfinfo = hfinfo;
fi->start = start;
- if (tvb) {
- fi->start += tvb_raw_offset(tvb);
- }
+ fi->start+=(tvb)?TVB_RAW_OFFSET(tvb):0;
fi->length = *length;
fi->tree_type = -1;
fi->visible = PTREE_DATA(tree)->visible;
@@ -2001,7 +1999,7 @@ proto_item_set_end(proto_item *pi, tvbuff_t *tvb, gint end)
if (pi == NULL)
return;
fi = PITEM_FINFO(pi);
- end += tvb_raw_offset(tvb);
+ end += TVB_RAW_OFFSET(tvb);
fi->length = end - fi->start;
}