aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lmi.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-05-16 14:48:34 -0400
committerAnders Broman <a.broman58@gmail.com>2017-05-17 15:16:42 +0000
commit99b76a5bc3db9579351c0fc7251086660f4f003f (patch)
tree362629bf932645e3742cf8dd32d1355b97604dac /epan/dissectors/packet-lmi.c
parent3b7790004a3e8df79fc313143b582a552081ed29 (diff)
Use proto_tree_add_item instead of proto_tree_add_xxx.
It's a little more efficient to use proto_tree_add_item, than proto_tree_add_xxx, passing it the returned tvb_get_xxx value. Change-Id: I22ddd7ab36e1ee5aae78fc693d7dbac4b4f802f2 Reviewed-on: https://code.wireshark.org/review/21691 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-lmi.c')
-rw-r--r--epan/dissectors/packet-lmi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-lmi.c b/epan/dissectors/packet-lmi.c
index 9d5cf26798..64f343589d 100644
--- a/epan/dissectors/packet-lmi.c
+++ b/epan/dissectors/packet-lmi.c
@@ -109,27 +109,27 @@ static const value_string pvc_status_act_str[] = {
static void
dissect_lmi_report_type(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree_add_uint(tree, hf_lmi_rcd_type, tvb, offset, 1, tvb_get_guint8( tvb, offset));
+ proto_tree_add_item(tree, hf_lmi_rcd_type, tvb, offset, 1, ENC_NA);
}
static void
dissect_lmi_link_int(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree_add_uint(tree, hf_lmi_send_seq, tvb, offset, 1, tvb_get_guint8( tvb, offset));
+ proto_tree_add_item(tree, hf_lmi_send_seq, tvb, offset, 1, ENC_NA);
++offset;
- proto_tree_add_uint(tree, hf_lmi_recv_seq, tvb, offset, 1, tvb_get_guint8( tvb, offset));
+ proto_tree_add_item(tree, hf_lmi_recv_seq, tvb, offset, 1, ENC_NA);
}
static void
dissect_lmi_pvc_status(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree_add_uint(tree, hf_lmi_dlci_high, tvb, offset, 1, tvb_get_guint8( tvb, offset));
+ proto_tree_add_item(tree, hf_lmi_dlci_high, tvb, offset, 1, ENC_NA);
++offset;
- proto_tree_add_uint(tree, hf_lmi_dlci_low, tvb, offset, 1, tvb_get_guint8( tvb, offset));
+ proto_tree_add_item(tree, hf_lmi_dlci_low, tvb, offset, 1, ENC_NA);
++offset;
- proto_tree_add_uint(tree, hf_lmi_new, tvb, offset, 1, tvb_get_guint8( tvb, offset));
- proto_tree_add_uint(tree, hf_lmi_act, tvb, offset, 1, tvb_get_guint8( tvb, offset));
+ proto_tree_add_item(tree, hf_lmi_new, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_lmi_act, tvb, offset, 1, ENC_NA);
}
static int