Wireshark-commits: [Wireshark-commits] master-2.6 a78a6fc: More PVS-Studio issues flagged by Valeri
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 17 May 2020 00:53:39 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=a78a6fc67b7caa83a2da1abe25d0ea44e250c639
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

a78a6fc 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/37231
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    

Actions performed:

    from  75a6906   Radius: Fix NULL pointer call
     add  a78a6fc   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(-)