Wireshark-commits: [Wireshark-commits] master f518089: Clean up the read routines.
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f518089709feba05fe8acfab76be5afc8bd97021
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
f518089 by Guy Harris (guy@xxxxxxxxxxxx):
Clean up the read routines.
The block read routines don't need to return a "bytes read" amount any
more.
Have pcapng_read_block() just return an indication:
PCAPNG_BLOCK_OK - the read succeeded;
PCAPNG_BLOCK_NOT_SHB - the read failed in a fashion that
indicates that we might just not be reading a pcap-ng file;
PCAPNG_BLOCK_ERROR - the read failed in some other fashion
(i.e., we already have concluded that the file is a pcap-ng
file, or we got an I/O error).
In the cases where it needs to know whether it's reading the first block
for an open, have it check the shb_read flag, rather than being passed a
separate Boolean argument.
This means that pcapng_read_section_header_block() should return such an
indication as well.
Make the other block-reading routines return a Boolean success/failure
indication.
Change-Id: Id371457018a008ece9058d6042da44d631e51889
Reviewed-on: https://code.wireshark.org/review/4710
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 371e4ae Eliminate some proto_tree_add_text from GSM dissectors (so now there are no dissectors with 100+ proto_tree_add_text calls).
adds f518089 Clean up the read routines.
Summary of changes:
wiretap/pcapng.c | 392 ++++++++++++++++++++++++++++--------------------------
1 file changed, 201 insertions(+), 191 deletions(-)