aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb-dfu.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.mathieson@keysight.com>2020-05-16 12:14:05 +0100
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2020-05-16 11:37:06 +0000
commitcf340fa0ec458e9a0fd97f4e6a6bd427217fd441 (patch)
tree3d9344091d6149f2b1aea70b22612c3c91874c6f /epan/dissectors/packet-usb-dfu.c
parent7794527604e27e6da88d4871ba27aa48ec89abd1 (diff)
USB: fix redundant assignments or tests flagged by PVS-Studio
Bug: 16335 Change-Id: I19ea32fb607bf4132c1690f46dca5ed055009b84 Reviewed-on: https://code.wireshark.org/review/37211 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'epan/dissectors/packet-usb-dfu.c')
-rw-r--r--epan/dissectors/packet-usb-dfu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-usb-dfu.c b/epan/dissectors/packet-usb-dfu.c
index fb1b18b6d8..9497ae3900 100644
--- a/epan/dissectors/packet-usb-dfu.c
+++ b/epan/dissectors/packet-usb-dfu.c
@@ -338,13 +338,11 @@ dissect_usb_dfu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
command_tree = proto_item_add_subtree(command_item, ett_command);
proto_item_set_generated(command_item);
- if (command_data) {
- command_item = proto_tree_add_uint(main_tree, hf_setup_interface, tvb, offset, 0, command_data->interface);
- proto_item_set_generated(command_item);
+ command_item = proto_tree_add_uint(main_tree, hf_setup_interface, tvb, offset, 0, command_data->interface);
+ proto_item_set_generated(command_item);
- command_item = proto_tree_add_uint(main_tree, hf_command_in_frame, tvb, offset, 0, command_data->command_frame_number);
- proto_item_set_generated(command_item);
- }
+ command_item = proto_tree_add_uint(main_tree, hf_command_in_frame, tvb, offset, 0, command_data->command_frame_number);
+ proto_item_set_generated(command_item);
switch (command_response) {
case 0x02: /* Upload */