Wireshark-commits: [Wireshark-commits] master 569f3bd: More PVS-Studio issues flagged by Valerii Za
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 09 May 2020 11:34:20 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=569f3bd6111cfebe2fcd62484d854a053b5c9636
Submitter: "Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

569f3bd by Martin Mathieson (martin.mathieson@xxxxxxxxxxxx):

    More PVS-Studio issues flagged by Valerii Zapodovnikov.
    
    /opt/SourceCode/wireshark/epan/dissectors/packet-frame.c	818	warn	V547 Expression 'fi' is always true.
    /opt/SourceCode/wireshark/epan/dissectors/packet-gsm_sms.c	2692	warn	V547 Expression 'length <= (offset - saved_offset)' is always false.
    /opt/SourceCode/wireshark/epan/dissectors/packet-isup.c	4688	warn	V1037 Two or more case-branches perform the same actions. Check lines: 4688, 4697
    /opt/SourceCode/wireshark/extcap/androiddump.c	1237	warn	V560 A part of conditional expression is always true: data_str.
    /opt/SourceCode/wireshark/extcap/androiddump.c	1603	warn	V547 Expression is always true.
    /opt/SourceCode/wireshark/ui/qt/models/packet_list_model.cpp	497	warn	V560 A part of conditional expression is always true: ok_r1.
    
    For the voip_calls.c change, I preferred to initailize along with every other field, rather than set to actual value it gets set to later.
    
    For the isobus-vt change, I could not find a spec but followed the pattern from other error bit fields.
    
    Bug: 16335
    Change-Id: Ie55082222b582f6fff4e8c7a992d863acee6cf15
    Reviewed-on: https://code.wireshark.org/review/37160
    Petri-Dish: Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>
    Reviewed-by: Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>
    

Actions performed:

    from  d795711   sll: se the value_string table for ARP hardware types.
     add  569f3bd   More PVS-Studio issues flagged by Valerii Zapodovnikov.


Summary of changes:
 epan/dissectors/packet-frame.c     |  2 +-
 epan/dissectors/packet-gsm_sms.c   | 15 +++++++--------
 epan/dissectors/packet-isobus-vt.c |  3 ++-
 extcap/androiddump.c               | 12 ++++--------
 ui/qt/models/packet_list_model.cpp |  2 +-
 ui/voip_calls.c                    |  8 +++-----
 6 files changed, 18 insertions(+), 24 deletions(-)