diff options
author | Michael Mann <mmann78@netscape.net> | 2014-10-19 00:29:35 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-10-19 15:26:43 +0000 |
commit | 5e4e17ca5e0d5910aad8d6e9fc8b23d9a68b756e (patch) | |
tree | 1173fb48a2db0e444b9a75ad1741ea8eda523cd3 /epan/dissectors/packet-rx.c | |
parent | 1427a8e9865d5bc1786499c0530ed56edb3fdebe (diff) |
Remove unnecessary tvb_ensure_bytes_exist calls.
All of the calls removed are followed by proto_tree_add_xxx calls of the same offset/length of the tvb_ensure_bytes_exist call. The proto_tree_add_xxx calls should throw the exception, so we don't need the "double check".
There are probably more calls that can be removed, these were just obvious as first glance, spurred mostly by noticing the (ab)use in packet-wsp.c
Change-Id: I37cee347c8cf8ab0559e21562c802d3b37f4871e
Reviewed-on: https://code.wireshark.org/review/4833
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rx.c')
-rw-r--r-- | epan/dissectors/packet-rx.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rx.c b/epan/dissectors/packet-rx.c index b8956fc807..a934be7a9a 100644 --- a/epan/dissectors/packet-rx.c +++ b/epan/dissectors/packet-rx.c @@ -233,7 +233,6 @@ dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, offset, 4, tl); offset += 4; - tvb_ensure_bytes_exist(tvb, offset, tl); proto_tree_add_item(tree, hf_rx_ticket, tvb, offset, tl, ENC_NA); offset += tl; } |