diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-08 22:40:20 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-08 22:40:20 +0000 |
commit | a40e52e2b612e7c3b62d87b42ec63ae8c4a4dd28 (patch) | |
tree | bb928b8f8ceb64d13eb7bb1d7323c19a2feb6245 /epan/dissectors/packet-enip.c | |
parent | d7d74ed5b1725cebaf4619080a0d3edf9ad9c032 (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
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23405 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-enip.c')
-rw-r--r-- | epan/dissectors/packet-enip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index 3ce7246721..5a29f02709 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -719,7 +719,7 @@ dissect_enip_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) g_tree = tree; /* An ENIP packet is at least 4 bytes long - we need the command type. */ - if (!tvb_bytes_exist(tvb, 0, 4)) + if (tvb_length(tvb) < 4) return 0; /* Get the command type and see if it's valid. */ @@ -739,7 +739,7 @@ dissect_enip_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) g_tree = tree; /* An ENIP packet is at least 4 bytes long - we need the command type. */ - if (!tvb_bytes_exist(tvb, 0, 4)) + if (tvb_length(tvb) < 4) return 0; /* Get the command type and see if it's valid. */ |