Wireshark-commits: [Wireshark-commits] master 5e4e17c: Remove unnecessary tvb_ensure_bytes_exist ca
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5e4e17ca5e0d5910aad8d6e9fc8b23d9a68b756e
Submitter: Alexis La Goutte (alexis.lagoutte@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
5e4e17c by Michael Mann (mmann78@xxxxxxxxxxxx):
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@xxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
Actions performed:
from 1427a8e [Automatic manuf, services and enterprise-numbers update for 2014-10-19]
adds 5e4e17c Remove unnecessary tvb_ensure_bytes_exist calls.
Summary of changes:
epan/dissectors/packet-dcerpc.c | 22 +------
epan/dissectors/packet-ieee8021ah.c | 14 ++--
epan/dissectors/packet-megaco.c | 1 -
epan/dissectors/packet-mikey.c | 80 +++-------------------
epan/dissectors/packet-mmse.c | 15 +----
epan/dissectors/packet-ndps.c | 24 -------
epan/dissectors/packet-nfs.c | 1 -
epan/dissectors/packet-rx.c | 1 -
epan/dissectors/packet-smb.c | 13 +---
epan/dissectors/packet-ssl-utils.c | 5 --
epan/dissectors/packet-ssl.c | 32 +--------
epan/dissectors/packet-wsp.c | 124 -----------------------------------
12 files changed, 20 insertions(+), 312 deletions(-)