aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tapa.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-11-08 22:40:20 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-11-08 22:40:20 +0000
commit90753a169e2dd869298bd39012eadaa214f203a0 (patch)
treebb928b8f8ceb64d13eb7bb1d7323c19a2feb6245 /epan/dissectors/packet-tapa.c
parent94859ac29b24f68349a691b39c37299b552795df (diff)
Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length(). non heuristic dissectors svn path=/trunk/; revision=23405
Diffstat (limited to 'epan/dissectors/packet-tapa.c')
-rw-r--r--epan/dissectors/packet-tapa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tapa.c b/epan/dissectors/packet-tapa.c
index 5ee2e601d0..a9c487f171 100644
--- a/epan/dissectors/packet-tapa.c
+++ b/epan/dissectors/packet-tapa.c
@@ -427,7 +427,7 @@ test_tapa_discover(tvbuff_t *tvb)
guint8 type, unknown, req_type;
guint16 length;
- if (!tvb_bytes_exist(tvb, 0, 4))
+ if (tvb_length(tvb) < 4)
return FALSE;
/* Type(1 byte) <= 5, unknown(1 byte), length(2 bytes) */
@@ -453,7 +453,7 @@ test_tapa_tunnel(tvbuff_t *tvb)
{
/* If it isn't IPv4, it's TAPA. IPv4: Version(1 byte) = 4,
length(2 bytes) >= 20 */
- if (!tvb_bytes_exist(tvb, 0, 4) ||
+ if (tvb_length(tvb) < 4 ||
(tvb_get_guint8(tvb, 0) & 0xF0) >= 0x40 ||
tvb_get_ntohs(tvb, 2) > 0 ||
tvb_get_guint8(tvb, 1) > 1) { /* Is tunnel type known? */