diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-11-08 22:40:20 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-11-08 22:40:20 +0000 |
commit | 90753a169e2dd869298bd39012eadaa214f203a0 (patch) | |
tree | bb928b8f8ceb64d13eb7bb1d7323c19a2feb6245 /epan/dissectors/packet-mpls-echo.c | |
parent | 94859ac29b24f68349a691b39c37299b552795df (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-mpls-echo.c')
-rw-r--r-- | epan/dissectors/packet-mpls-echo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mpls-echo.c b/epan/dissectors/packet-mpls-echo.c index 767efd512e..5846e820cf 100644 --- a/epan/dissectors/packet-mpls-echo.c +++ b/epan/dissectors/packet-mpls-echo.c @@ -945,7 +945,7 @@ dissect_mpls_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) const guint8 *ts_sent, *ts_rec; /* If version != 1 we assume it's not an mpls ping packet */ - if (!tvb_bytes_exist(tvb, 0, 5)) { + if (tvb_length(tvb) < 5) { return; /* Not enough information to tell version and message type. */ } if (tvb_get_ntohs(tvb, 0) != 1) { |