aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cigi.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-09 06:01:18 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-09 06:01:18 +0000
commit52c22485f76e560bd64b369273b601b5bfa0f3b9 (patch)
tree874c9902e9d5e87aeda6b3c11e76dd35b41312f0 /epan/dissectors/packet-cigi.c
parent58b59b69930f7d89d1fec724f4de0832835175aa (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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23412 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-cigi.c')
-rw-r--r--epan/dissectors/packet-cigi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-cigi.c b/epan/dissectors/packet-cigi.c
index fa123158a6..d0db7ef365 100644
--- a/epan/dissectors/packet-cigi.c
+++ b/epan/dissectors/packet-cigi.c
@@ -1875,7 +1875,7 @@ packet_is_cigi(tvbuff_t *tvb)
guint8 reserved;
- if (!tvb_bytes_exist(tvb, 0, 3)) {
+ if (tvb_length(tvb) < 3) {
/* Not enough data available to check */
return FALSE;
}