aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/epan
diff options
context:
space:
mode:
authorMatthias Dietrich <matthias.dietrich@gmx.fr>2022-05-19 22:28:31 +0200
committerA Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2022-05-21 07:52:07 +0000
commit7b53720999e640c86816a292be0bd9e6d0425f99 (patch)
tree7d9023b0ca46c5c973a2ca4ed2d145aceac12226 /plugins/epan
parentcc4223f537995095b0038aa787b2efdf9b60b736 (diff)
Use proto_tree_add_item where possible
Diffstat (limited to 'plugins/epan')
-rw-r--r--plugins/epan/profinet/packet-pn-rtc-one.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/epan/profinet/packet-pn-rtc-one.c b/plugins/epan/profinet/packet-pn-rtc-one.c
index 9c8e1df979..0261188b07 100644
--- a/plugins/epan/profinet/packet-pn-rtc-one.c
+++ b/plugins/epan/profinet/packet-pn-rtc-one.c
@@ -983,7 +983,7 @@ dissect_pn_pa_profile_status(tvbuff_t *tvb, int offset,
u8status = tvb_get_guint8(tvb, offset);
quality = (u8status >> 6u) & 0x3u;
- /* add ioxs subtree */
+ /* add status subtree */
status_item = proto_tree_add_uint(tree, hfindex, tvb, offset, 1, u8status);
quality_name = try_val_to_str(quality, pn_pa_profile_status_quality);
@@ -994,23 +994,24 @@ dissect_pn_pa_profile_status(tvbuff_t *tvb, int offset,
status_tree = proto_item_add_subtree(status_item, ett_pn_pa_profile_status);
- proto_tree_add_uint(status_tree, hf_pn_pa_profile_status_quality, tvb, offset, 1, u8status);
+ proto_tree_add_item(status_tree, hf_pn_pa_profile_status_quality, tvb, offset, 1, ENC_NA);
+
switch(quality)
{
case 0:
- proto_tree_add_uint(status_tree, hf_pn_pa_profile_status_substatus_bad, tvb, offset, 1, u8status);
+ proto_tree_add_item(status_tree, hf_pn_pa_profile_status_substatus_bad, tvb, offset, 1, ENC_NA);
break;
case 1:
- proto_tree_add_uint(status_tree, hf_pn_pa_profile_status_substatus_uncertain, tvb, offset, 1, u8status);
+ proto_tree_add_item(status_tree, hf_pn_pa_profile_status_substatus_uncertain, tvb, offset, 1, ENC_NA);
break;
case 2:
- proto_tree_add_uint(status_tree, hf_pn_pa_profile_status_substatus_good, tvb, offset, 1, u8status);
+ proto_tree_add_item(status_tree, hf_pn_pa_profile_status_substatus_good, tvb, offset, 1, ENC_NA);
break;
default:
break;
}
- proto_tree_add_uint(status_tree, hf_pn_pa_profile_status_update_event, tvb, offset, 1, u8status);
- proto_tree_add_uint(status_tree, hf_pn_pa_profile_status_simulate, tvb, offset, 1, u8status);
+ proto_tree_add_item(status_tree, hf_pn_pa_profile_status_update_event, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(status_tree, hf_pn_pa_profile_status_simulate, tvb, offset, 1, ENC_NA);
}
return offset + 1;