aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lapdm.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-13 08:56:22 -0400
committerAnders Broman <a.broman58@gmail.com>2014-08-14 04:21:05 +0000
commitd68d0e88b4924a610b5cd2fd3a748b00c9bbab1a (patch)
treef46c04238502faa689c173f1b8420c8d19d3c51e /epan/dissectors/packet-lapdm.c
parentf64421df3f230e89e0d83e327926f4c46fbd70dc (diff)
Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the neighborhood. Change-Id: If73a029f564219782c313d4154c24c7ce7458b52 Reviewed-on: https://code.wireshark.org/review/3574 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: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-lapdm.c')
-rw-r--r--epan/dissectors/packet-lapdm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c
index 7a5692d808..9f84d03d3e 100644
--- a/epan/dissectors/packet-lapdm.c
+++ b/epan/dissectors/packet-lapdm.c
@@ -86,6 +86,7 @@ static int hf_lapdm_len = -1;
/*
* LAPDm fragment handling
*/
+static int hf_lapdm_fragment_data = -1;
static int hf_lapdm_fragments = -1;
static int hf_lapdm_fragment = -1;
static int hf_lapdm_fragment_overlap = -1;
@@ -322,9 +323,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else {
col_append_str(pinfo->cinfo, COL_INFO, " (Fragment)");
- if (tree) {
- proto_tree_add_text(lapdm_tree, payload, 0, -1, "Fragment Data");
- }
+ proto_tree_add_item(lapdm_tree, hf_lapdm_fragment_data, payload, 0, -1, ENC_NA);
}
/* Now reset fragmentation information in pinfo
@@ -425,6 +424,10 @@ proto_register_lapdm(void)
/* Fragment reassembly
*/
+ { &hf_lapdm_fragment_data,
+ { "Fragment Data", "lapdm.fragment_data", FT_NONE, BASE_NONE,
+ NULL, 0x00, NULL, HFILL }},
+
{ &hf_lapdm_fragments,
{ "Message fragments", "lapdm.fragments", FT_NONE, BASE_NONE,
NULL, 0x00, "LAPDm Message fragments", HFILL }},