diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-04-08 10:41:55 +0200 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-04-08 15:04:26 +0000 |
commit | 7a3cd91a0a0ea96e847a2c62f71f6827921eea6d (patch) | |
tree | eb87f3e048e4886d844a0d9c3d875cd59e66ca3f /epan | |
parent | 8d6b20ad2d75f172f48df5525f609c2a9e7ab736 (diff) |
reformat the code for bulk, interrupt urbs
Change-Id: Ib2374df62daf0fc26fb02202d3a64e59b902a1e8
Reviewed-on: https://code.wireshark.org/review/1016
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-usb.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 13f1678916..075f3f34c1 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -2698,6 +2698,7 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, guint16 hdr_len; guint32 win32_data_len = 0; proto_tree *tree; + proto_item *item; static usb_address_t src_addr, dst_addr; /* has to be static due to SET_ADDRESS */ gboolean is_request; usb_conv_info_t *usb_conv_info; @@ -2872,18 +2873,16 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, switch(type) { - case URB_BULK: - case URB_INTERRUPT: - { - proto_item *item; - - item = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); - PROTO_ITEM_SET_GENERATED(item); + case URB_BULK: + case URB_INTERRUPT: + item = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); + PROTO_ITEM_SET_GENERATED(item); - if (header_info & USB_HEADER_IS_LINUX) { - /* Skip setup/isochronous header - it's not applicable */ - proto_tree_add_item(tree, hf_usb_urb_unused_setup_header, tvb, offset, 8, ENC_NA); - offset += 8; + if (header_info & USB_HEADER_IS_LINUX) { + /* Skip setup/isochronous header - it's not applicable */ + proto_tree_add_item(tree, hf_usb_urb_unused_setup_header, tvb, offset, 8, ENC_NA); + offset += 8; + } /* * If this has a 64-byte header, process the extra 16 bytes of @@ -2892,9 +2891,8 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, if (header_info & USB_HEADER_IS_64_BYTES) { offset = dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, tree); } - } - } - break; + break; + case URB_CONTROL: { const usb_setup_dissector_table_t *tmp; |