aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cimd.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-cimd.c')
-rw-r--r--epan/dissectors/packet-cimd.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/epan/dissectors/packet-cimd.c b/epan/dissectors/packet-cimd.c
index 13609bed1e..3eb9171a64 100644
--- a/epan/dissectors/packet-cimd.c
+++ b/epan/dissectors/packet-cimd.c
@@ -452,12 +452,10 @@ static gint hf_index[MAXPARAMSCOUNT];
static void dissect_cimd_parameter(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint startOffset, gint endOffset)
{
/* Set up structures needed to add the param subtree and manage it */
- proto_item *param_item;
proto_tree *param_tree;
- param_item = proto_tree_add_text(tree, tvb, startOffset + 1, endOffset - (startOffset + 1),
- "%s", cimd_vals_PC[pindex].strptr);
- param_tree = proto_item_add_subtree(param_item, (*vals_hdr_PC[pindex].ett_p));
+ param_tree = proto_tree_add_subtree(tree, tvb, startOffset + 1, endOffset - (startOffset + 1),
+ (*vals_hdr_PC[pindex].ett_p), NULL, cimd_vals_PC[pindex].strptr);
proto_tree_add_item(param_tree, hf_cimd_pcode_indicator, tvb,
startOffset + 1, CIMD_PC_LENGTH, ENC_ASCII|ENC_NA);
@@ -468,7 +466,6 @@ static void dissect_cimd_parameter(tvbuff_t *tvb, proto_tree *tree, gint pindex,
static void dissect_cimd_ud(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint startOffset, gint endOffset)
{
/* Set up structures needed to add the param subtree and manage it */
- proto_item *param_item;
proto_tree *param_tree;
gchar *payloadText, *tmpBuffer, *tmpBuffer1;
@@ -489,11 +486,10 @@ static void dissect_cimd_ud(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint s
"_o\"", "_n~", "_n\"","_a`"
};
- param_item = proto_tree_add_text(tree, tvb,
+ param_tree = proto_tree_add_subtree(tree, tvb,
startOffset + 1, endOffset - (startOffset + 1),
- "%s", cimd_vals_PC[pindex].strptr
+ (*vals_hdr_PC[pindex].ett_p), NULL, cimd_vals_PC[pindex].strptr
);
- param_tree = proto_item_add_subtree(param_item, (*vals_hdr_PC[pindex].ett_p));
proto_tree_add_item(param_tree, hf_cimd_pcode_indicator, tvb,
startOffset + 1, CIMD_PC_LENGTH, ENC_ASCII|ENC_NA);
@@ -744,13 +740,11 @@ static void dissect_cimd_dcs(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint
static void dissect_cimd_error_code( tvbuff_t *tvb, proto_tree *tree, gint pindex, gint startOffset, gint endOffset )
{
/* Same routine can be used to dissect CIMD Error,Status and Status Error Codes */
- proto_item *param_item;
proto_tree *param_tree;
guint32 err_code;
- param_item = proto_tree_add_text(tree, tvb, startOffset + 1, endOffset - (startOffset + 1),
- "%s", cimd_vals_PC[pindex].strptr);
- param_tree = proto_item_add_subtree(param_item, (*vals_hdr_PC[pindex].ett_p));
+ param_tree = proto_tree_add_subtree(tree, tvb, startOffset + 1, endOffset - (startOffset + 1),
+ (*vals_hdr_PC[pindex].ett_p), NULL, cimd_vals_PC[pindex].strptr);
proto_tree_add_item(param_tree, hf_cimd_pcode_indicator, tvb, startOffset + 1, CIMD_PC_LENGTH, ENC_ASCII|ENC_NA);