Wireshark-commits: [Wireshark-commits] master 70a1d1c: Get rid of get_opaque_length() and unneeded
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 10 Apr 2018 05:31:33 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=70a1d1c2e54850e2565bc9d4835709c72cab76ad
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

70a1d1c by Guy Harris (guy@xxxxxxxxxxxx):

    Get rid of get_opaque_length() and unneeded length arguments.
    
    In most calls to get_opaque_length(), the length is a constant, so just
    directly fetch the length value.  In the calls in dissect_nodeid_list()
    and dissect_kindid_list(), the length is an argument to the routine
    making the call, and *those* arguments are, for each of the routines,
    the same constant for all calls to the routine in question, so just
    directly fetch the length value in those routines.
    
    This lets us avoid checks for a valid length-of-length, so we don't need
    to have the length-of-length be a signed value with -1 meaning
    "invalid".  That's good, because nothing was actually *checking* for an
    invalid length-of-length.
    
    Change-Id: I58264c133977266f3214d6e4ca361f71ecc0b69a
    Reviewed-on: https://code.wireshark.org/review/26842
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  bbd0142   Nb is an unsigned value; treat it as such.
    adds  70a1d1c   Get rid of get_opaque_length() and unneeded length arguments.


Summary of changes:
 epan/dissectors/packet-reload.c | 98 +++++++++++++++--------------------------
 1 file changed, 36 insertions(+), 62 deletions(-)