aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btrfcomm.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-18 06:04:09 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-18 06:04:09 +0000
commitc2976ac50824db30343fa2cee70d05ac83423ef3 (patch)
treedfdc963c67873edbfeae35145696fa7399a85333 /epan/dissectors/packet-btrfcomm.c
parent5726546c6330267c15b9b06814f0c73b5c7aa5ba (diff)
From Michal Labedzki:
Fix issues discovered by cppcheck Also use global OUI array in AVRCP. Thanks to Evan Huus for cppcheck. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8304 svn path=/trunk/; revision=48387
Diffstat (limited to 'epan/dissectors/packet-btrfcomm.c')
-rw-r--r--epan/dissectors/packet-btrfcomm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index 2a20a0ad79..89190398bd 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -559,14 +559,12 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
proto_tree *rfcomm_tree;
- proto_tree *ctrl_tree;
int offset = 0;
int fcs_offset;
guint8 dlci, cr_flag, ea_flag;
guint8 frame_type, pf_flag;
guint16 frame_len;
dlci_state_t *dlci_state = NULL;
- dissector_handle_t decode_by_dissector;
ti = proto_tree_add_item(tree, proto_btrfcomm, tvb, offset, -1, ENC_NA);
rfcomm_tree = proto_item_add_subtree(ti, ett_btrfcomm);
@@ -639,8 +637,9 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* multiplexer control command */
if (!dlci && frame_len) {
proto_item *mcc_ti;
- proto_tree *dlci_tree = NULL;
- proto_item *dlci_item = NULL;
+ proto_tree *ctrl_tree;
+ proto_tree *dlci_tree;
+ proto_item *dlci_item;
guint32 mcc_type, length;
guint8 mcc_cr_flag, mcc_ea_flag;
guint8 mcc_channel;
@@ -707,9 +706,10 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* for this kind of service, if none is found dissect it as raw "data"
*/
if (dlci && frame_len) {
- tvbuff_t *next_tvb;
- btl2cap_data_t *l2cap_data;
- btrfcomm_data_t rfcomm_data;
+ dissector_handle_t decode_by_dissector;
+ tvbuff_t *next_tvb;
+ btl2cap_data_t *l2cap_data;
+ btrfcomm_data_t rfcomm_data;
next_tvb = tvb_new_subset(tvb, offset, frame_len, frame_len);