aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btle.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-15 13:01:27 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-16 03:04:11 +0000
commit232cb9a2dd87ea9cc9c88d4c32bfb7b452705130 (patch)
treeff1b2039727322c1f8e332f2040f0ba5d83c4f43 /epan/dissectors/packet-btle.c
parent8efb7fece1ffefd26dacd79f5ec8722c4e01e827 (diff)
Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.
Many proto_item_append_text calls were just adding a unit string to a field. There's a better way to do that now. Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78 Reviewed-on: https://code.wireshark.org/review/19289 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-btle.c')
-rw-r--r--epan/dissectors/packet-btle.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-btle.c b/epan/dissectors/packet-btle.c
index 427f57ca42..cda6b8880f 100644
--- a/epan/dissectors/packet-btle.c
+++ b/epan/dissectors/packet-btle.c
@@ -1146,15 +1146,13 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_tree_add_item(btle_tree, hf_control_max_rx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- sub_item = proto_tree_add_item(btle_tree, hf_control_max_rx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- proto_item_append_text (sub_item, " microseconds");
+ proto_tree_add_item(btle_tree, hf_control_max_rx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
proto_tree_add_item(btle_tree, hf_control_max_tx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- sub_item = proto_tree_add_item(btle_tree, hf_control_max_tx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- proto_item_append_text (sub_item, " microseconds");
+ proto_tree_add_item(btle_tree, hf_control_max_tx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
break;
@@ -1596,7 +1594,7 @@ proto_register_btle(void)
},
{ &hf_control_max_rx_time,
{ "Max RX time", "btle.control.max_rx_time",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_microsecond_microseconds, 0x0,
NULL, HFILL }
},
{ &hf_control_max_tx_octets,
@@ -1606,7 +1604,7 @@ proto_register_btle(void)
},
{ &hf_control_max_tx_time,
{ "Max TX time", "btle.control.max_tx_time",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_microsecond_microseconds, 0x0,
NULL, HFILL }
},
{ &hf_l2cap_fragment,