summaryrefslogtreecommitdiff
path: root/epan/tvbuff.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/tvbuff.c
parentdcd98ae8d334081d0b4e0f4c6902ac128dfeb000 (diff)
downloadwireshark-5ff0237060f1b93f5efe8e4041bbde2a2f674cbe.tar.gz
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/tvbuff.c')
-rw-r--r--epan/tvbuff.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index c3b8a69a2d..b1bcd31c14 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.c,v 1.52 2003/12/02 10:23:18 sahlberg Exp $
+ * $Id: tvbuff.c,v 1.53 2003/12/03 09:50:40 sahlberg Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -717,7 +717,7 @@ first_real_data_ptr(tvbuff_t *tvb)
return NULL;
}
-static int
+int
offset_from_real_beginning(tvbuff_t *tvb, int counter)
{
tvbuff_t *member;
@@ -737,15 +737,6 @@ offset_from_real_beginning(tvbuff_t *tvb, int counter)
return 0;
}
-gint
-tvb_raw_offset(tvbuff_t *tvb)
-{
- if (tvb->raw_offset == -1) {
- tvb->raw_offset = offset_from_real_beginning(tvb, 0);
- }
- return tvb->raw_offset;
-}
-
static guint8*
composite_ensure_contiguous_no_exception(tvbuff_t *tvb, guint abs_offset,
guint abs_length)