aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zcl-ha.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-09-06 21:32:39 -0400
committerEvan Huus <eapache@gmail.com>2014-09-07 17:08:29 +0000
commit2b27d91f2671d9fb9d9f8791e75d83c0cb3b73b2 (patch)
treef33941c31fdb5d755d6690d4d5d577a92e22fb50 /epan/dissectors/packet-zbee-zcl-ha.c
parentf76b4d934662451f05820408b4841d08a2b2d351 (diff)
Eliminate proto_tree_add_text from some of the dissectors.
Other minor cleanups while in the area. Change-Id: Id8dab02df6f111c3462238c3de1bf201e037ca48 Reviewed-on: https://code.wireshark.org/review/4022 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-zbee-zcl-ha.c')
-rw-r--r--epan/dissectors/packet-zbee-zcl-ha.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-zbee-zcl-ha.c b/epan/dissectors/packet-zbee-zcl-ha.c
index da1def3b1e..4bad7b6493 100644
--- a/epan/dissectors/packet-zbee-zcl-ha.c
+++ b/epan/dissectors/packet-zbee-zcl-ha.c
@@ -267,8 +267,7 @@ dissect_zcl_appl_idt_attr_id(proto_tree *tree, tvbuff_t *tvb, guint *offset)
void
dissect_zcl_appl_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{
- proto_item *ti = NULL;
- proto_tree *sub_tree = NULL;
+ proto_tree *sub_tree;
guint64 value64;
/* Dissect attribute data type and data */
@@ -276,8 +275,8 @@ dissect_zcl_appl_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, g
case ZBEE_ZCL_ATTR_ID_APPL_IDT_BASIC_IDENT:
value64 = tvb_get_letoh56(tvb, *offset);
- ti = proto_tree_add_text(tree, tvb, *offset, 8, "Basic Identification: 0x%" G_GINT64_MODIFIER "x", value64);
- sub_tree = proto_item_add_subtree(ti, ett_zbee_zcl_appl_idt_basic);
+ sub_tree = proto_tree_add_subtree_format(tree, tvb, *offset, 8, ett_zbee_zcl_appl_idt_basic, NULL,
+ "Basic Identification: 0x%" G_GINT64_MODIFIER "x", value64);
proto_tree_add_item(sub_tree, hf_zbee_zcl_appl_idt_company_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -938,7 +937,6 @@ dissect_zcl_appl_evtalt_get_alerts_rsp(tvbuff_t *tvb, proto_tree *tree, guint *o
/* Retrieve "Alert Count" field */
count = tvb_get_guint8(tvb, *offset) & ZBEE_ZCL_APPL_EVTALT_COUNT_NUM_MASK;
- proto_tree_add_text(tree, tvb, *offset, 1, "Alert Count: 0x%02x", count);
proto_tree_add_item(tree, hf_zbee_zcl_appl_evtalt_count_num, tvb, *offset, 1, ENC_NA);
proto_tree_add_item(tree, hf_zbee_zcl_appl_evtalt_count_type, tvb, *offset, 1, ENC_NA);
*offset += 1;