diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-11-09 06:01:18 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-11-09 06:01:18 +0000 |
commit | 622603589393ddd44656437f2e323c7fecf1c362 (patch) | |
tree | 874c9902e9d5e87aeda6b3c11e76dd35b41312f0 /epan/dissectors/packet-dcerpc.c | |
parent | 29cf34d1c2fa3d56559fd08cfa4bc5616f9cbf14 (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-dcerpc.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 95af4b7e40..7c62a1196b 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -4741,7 +4741,7 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * have an 80 byte header on them. Which starts with * version (4), pkt_type. */ - if (!tvb_bytes_exist (tvb, 0, sizeof (hdr))) { + if (tvb_length (tvb) < sizeof (hdr)) { return FALSE; } |