Wireshark-commits: [Wireshark-commits] master 3ac19d3: Clean up the setting of the len and caplen f

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 15 Mar 2014 19:19:27 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3ac19d36439b9f0a27321a7d51bd1f99e36c57f6
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

3ac19d3 by Guy Harris (guy@xxxxxxxxxxxx):

    Clean up the setting of the len and caplen fields.
    
    Always include the length of the metadata headers, as we're always
    copying them.
    
    Do a straightforward check to make sure the data length is >= 4 before
    subtracting out the FCS (which appears not to actually be an FCS; at
    least in the captures I've seen, it looks like random junk).
    
    Improve the comments for that code.
    
    Get rid of some tabs, in favor of spaces, while we're at it, and make
    the 3 sections of code where that's done more alike.
    
    Change-Id: Ica338cd492ac535833933a8b7cd5191217c5ab5b
    Reviewed-on: https://code.wireshark.org/review/685
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  42c522c   (Minor) prefs_register_protocol() callback not required; Therefore: simplify proto_reg_handoff...().
    adds  3ac19d3   Clean up the setting of the len and caplen fields.


Summary of changes:
 wiretap/vwr.c |  114 +++++++++++++++++++++++++++++++++------------------------
 1 file changed, 66 insertions(+), 48 deletions(-)