aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x25.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-x25.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-x25.c')
-rw-r--r--epan/dissectors/packet-x25.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index 4baac06e74..b30ac71670 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -1831,12 +1831,10 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
localoffset, 1, pkt_type);
proto_tree_add_uint(x25_tree, hf_x25_type_data, tvb,
localoffset, 1, pkt_type);
- proto_tree_add_uint(x25_tree, hf_x25_p_s_mod128, tvb,
- localoffset+1, 1,
- tvb_get_guint8(tvb, localoffset+1));
- proto_tree_add_boolean(x25_tree, hf_x25_mbit_mod128, tvb,
- localoffset+1, 1,
- tvb_get_guint8(tvb, localoffset+1));
+ proto_tree_add_item(x25_tree, hf_x25_p_s_mod128, tvb,
+ localoffset+1, 1, ENC_NA);
+ proto_tree_add_item(x25_tree, hf_x25_mbit_mod128, tvb,
+ localoffset+1, 1, ENC_NA);
}
}
if (modulo == 8) {