aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-qllc.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-09-05 08:48:37 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-09-06 07:44:46 +0000
commitceef7eba755cbecf670653360f72d864949dac49 (patch)
tree2cc48ebd17a4e7dc714f1b00af21f4f92546c948 /epan/dissectors/packet-qllc.c
parentf1ad9eb212a6f4c5e1b6b1963bccf5f3a4900293 (diff)
Eliminate proto_tree_add_text from some of the dissectors.
Other minor cleanups while in the area. Change-Id: I8ea59205cfe6fab643d8fe01b75ce91532004fd9 Reviewed-on: https://code.wireshark.org/review/4004 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-qllc.c')
-rw-r--r--epan/dissectors/packet-qllc.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/epan/dissectors/packet-qllc.c b/epan/dissectors/packet-qllc.c
index d75d924cc3..72bfc267f7 100644
--- a/epan/dissectors/packet-qllc.c
+++ b/epan/dissectors/packet-qllc.c
@@ -118,26 +118,14 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
* a COMMAND or RESPONSE. */
if (ctrl == QRD_QDISC_VALUE) {
if (command) {
- col_set_str(pinfo->cinfo, COL_INFO, QDISC_TEXT);
- if (tree) {
- proto_tree_add_text(qllc_tree, tvb,
- 1, 1, "Control Field: %s (0x%02x)", QDISC_TEXT, ctrl);
- }
+ col_set_str(pinfo->cinfo, COL_INFO, QDISC_TEXT);
+ proto_tree_add_uint_format_value(qllc_tree, hf_qllc_control, tvb,
+ 1, 1, ctrl, "%s (0x%02x)", QDISC_TEXT, ctrl);
}
else {
- col_set_str(pinfo->cinfo, COL_INFO, QRD_TEXT);
- if (tree) {
- proto_tree_add_text(qllc_tree, tvb,
- 1, 1, "Control Field: %s (0x%02x)", QRD_TEXT, ctrl);
- }
- }
-
- /* Add the field for filtering purposes */
- if (tree) {
- proto_item *hidden_item;
- hidden_item = proto_tree_add_uint(qllc_tree, hf_qllc_control, tvb,
- 1, 1, ctrl);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ col_set_str(pinfo->cinfo, COL_INFO, QRD_TEXT);
+ proto_tree_add_uint_format_value(qllc_tree, hf_qllc_control, tvb,
+ 1, 1, ctrl, "%s (0x%02x)", QRD_TEXT, ctrl);
}
}
else {