Wireshark-commits: [Wireshark-commits] master 90a68d1: e100: clean up the dissector

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 06 Apr 2020 06:05:54 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=90a68d117a3c94202f0eec4fbc2ef0cf2d3764eb
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

90a68d1 by Martin Kaiser (wireshark@xxxxxxxxx):

    e100: clean up the dissector
    
    Exit straight away if the packet is not e100, don't wrap the
    dissection code into a big if-statement.
    
    Move all variable desclarations to the beginning of the function.
    Remove unnecessary initializers for the variables.
    
    Remove the pointless if (tree) check.
    
    Remove the manual calculations for the timestamp, we can
    use proto_tree_add_item() with ENC_TIME_SECS_USECS.
    
    Use proto_tree_add_item_ret_uint() if we need the value of a field.
    
    No functional change intended. I checked that this patch does not
    change the output of
    
    tshark -r E100_TestCap.pcap -Y e100 -V
    
    (where E100_TestCap.pcap is the sample capture from bug 3195)
    
    Change-Id: I533209906165beecec397cf9c1864e2b02429232
    Reviewed-on: https://code.wireshark.org/review/36703
    Reviewed-by: Martin Kaiser <wireshark@xxxxxxxxx>
    Petri-Dish: Martin Kaiser <wireshark@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  13d5615   gsm_map: Dissect location number with the ISUP dissect function
     add  90a68d1   e100: clean up the dissector


Summary of changes:
 epan/dissectors/packet-e100.c | 90 +++++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 51 deletions(-)