Wireshark-commits: [Wireshark-commits] master-3.0 eb85bf5: More PVS-Studio issues flagged by Valeri

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 17 May 2020 00:38:28 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=eb85bf5971764c524367160326e0e7977f9df90d
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

eb85bf5 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>
    (cherry picked from commit 569f3bd6111cfebe2fcd62484d854a053b5c9636)
    Reviewed-on: https://code.wireshark.org/review/37225
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    

Actions performed:

    from  b36232d   Radius: Fix NULL pointer call
     add  eb85bf5   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(-)