diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-04-08 10:14:35 +0200 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-04-08 15:04:12 +0000 |
commit | 8d6b20ad2d75f172f48df5525f609c2a9e7ab736 (patch) | |
tree | 9b19daedb1a80b9f59cb5f301cbfce0e2205422c /epan | |
parent | 7952e2aadf3e844380f56861bf064b2593a06c75 (diff) |
move the assignments for is_request, endpoint behind the if statements
Change-Id: Id3938253bbc63cc27823afa326b1997182e3943d
Reviewed-on: https://code.wireshark.org/review/1015
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-usb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 8fbf3f4b6b..13f1678916 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -2725,10 +2725,8 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, dissect_linux_usb_pseudo_header(tvb, pinfo, tree, &bus_id, &device_address); urb_type = tvb_get_guint8(tvb, 8); - is_request = (urb_type == URB_SUBMIT) ? TRUE : FALSE; type = tvb_get_guint8(tvb, 9); endpoint_with_dir = tvb_get_guint8(tvb, 10); - endpoint = endpoint_with_dir & (~URB_TRANSFER_IN); setup_flag = tvb_get_guint8(tvb, 14); offset += 40; /* skip first part of the pseudo-header */ } else if (header_info & USB_HEADER_IS_USBPCAP) { @@ -2749,10 +2747,8 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, } else { urb_type = URB_SUBMIT; } - is_request = (urb_type == URB_SUBMIT) ? TRUE : FALSE; type = tvb_get_guint8(tvb, 22); endpoint_with_dir = tvb_get_guint8(tvb, 21); - endpoint = endpoint_with_dir & (~URB_TRANSFER_IN); win32_data_len = tvb_get_letohl(tvb, 23); usbpcap_control_stage = tvb_get_guint8(tvb, 27); @@ -2772,6 +2768,9 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, return; } + endpoint = endpoint_with_dir & (~URB_TRANSFER_IN); + is_request = (urb_type == URB_SUBMIT) ? TRUE : FALSE; + /* Set up addresses and ports. */ if (is_request) { src_addr.device = 0xffffffff; |