aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tds.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-11-09 06:01:18 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-11-09 06:01:18 +0000
commit622603589393ddd44656437f2e323c7fecf1c362 (patch)
tree874c9902e9d5e87aeda6b3c11e76dd35b41312f0 /epan/dissectors/packet-tds.c
parent29cf34d1c2fa3d56559fd08cfa4bc5616f9cbf14 (diff)
Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length(). On the other hand if (tvb_bytes_exist(tvb, 0, 20) is more readable than if (tvb_length(tvb) >= 20 so only do it in heuristic function svn path=/trunk/; revision=23412
Diffstat (limited to 'epan/dissectors/packet-tds.c')
-rw-r--r--epan/dissectors/packet-tds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c
index 8f04cfaa69..3eaf53ac9b 100644
--- a/epan/dissectors/packet-tds.c
+++ b/epan/dissectors/packet-tds.c
@@ -1888,7 +1888,7 @@ dissect_tds_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* If we don't have even enough data for a Netlib header,
* just say it's not TDS.
*/
- if (!tvb_bytes_exist(tvb, offset, 8))
+ if (tvb_length(tvb) < 8)
return FALSE;
/*