diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2020-05-03 00:33:51 +0100 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-03 00:26:33 +0000 |
commit | b99dcf0593e105bf46603e714d295b04b72c28bd (patch) | |
tree | 831e031678e238e1caf55a084009e1ed3dbe5e66 /epan/dissectors/packet-aoe.c | |
parent | bab7b8d638ba0ac6901d4295586d1f9865cbbb76 (diff) |
Fix some issues seen with a fresh run of PVS Studio
/opt/SourceCode/wireshark/epan/dissectors/packet-aoe.c 328 warn V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 323, 328.
/opt/SourceCode/wireshark/epan/dissectors/packet-aprs.c 1148 warn V1037 Two or more case-branches perform the same actions. Check lines: 1148, 1161
/opt/SourceCode/wireshark/epan/dissectors/packet-lsd.c 127 err V547 Expression 'strlen("cookie") == 0' is always false.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 3385 warn V547 Expression 'conversation == NULL' is always true.
/opt/SourceCode/wireshark/epan/dissectors/packet-snort-config.c 465 note V576 Incorrect format. Consider checking the fourth actual argument of the 'g_snprintf' function. Under certain conditions the pointer can be null.
/opt/SourceCode/wireshark/epan/dissectors/packet-snort.c 630 warn V768 The variable 'condition' is of enum type. It is odd that it is used as a variable of a Boolean-type.
/opt/SourceCode/wireshark/epan/dissectors/packet-snort.c 969 warn V547 Expression '!attempt_match' is always false.
Bug: 16335
Change-Id: I93bbc40f0467ebaab74335f6edc7d60e1c600a94
Reviewed-on: https://code.wireshark.org/review/37044
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'epan/dissectors/packet-aoe.c')
-rw-r--r-- | epan/dissectors/packet-aoe.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-aoe.c b/epan/dissectors/packet-aoe.c index 4103dca878..8f8c3e3362 100644 --- a/epan/dissectors/packet-aoe.c +++ b/epan/dissectors/packet-aoe.c @@ -320,12 +320,10 @@ dissect_aoe_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(flags_tree, hf_aoe_flags_error, tvb, 0, 1, ENC_BIG_ENDIAN); proto_item_append_text(flags_item,(flags&AOE_FLAGS_RESPONSE)?" Response":" Request"); - if(flags&AOE_FLAGS_ERROR){ - proto_item_append_text(flags_item, " Error"); - } /* error */ if(flags&AOE_FLAGS_ERROR){ + proto_item_append_text(flags_item, " Error"); proto_tree_add_item(tree, hf_aoe_error, tvb, 1, 1, ENC_BIG_ENDIAN); col_append_fstr(pinfo->cinfo, COL_INFO, "Error:%s ", val_to_str(tvb_get_guint8(tvb, 1), error_vals, "Unknown error<%d>")); } |