diff options
author | Hannes Mezger <hannes.mezger@ascolab.com> | 2014-10-16 14:59:53 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-10-16 16:55:47 +0000 |
commit | 381966b6c490d3e6a1ef750c7616ddf95e1dcfd4 (patch) | |
tree | b5e4c6db88f4fc235b8cd7c63fb4a7e76a49cc23 /plugins/opcua/opcua_extensionobjecttable.c | |
parent | 14b75d838d34cf939d723542f8f31bf2b2bce9ab (diff) | |
download | wireshark-381966b6c490d3e6a1ef750c7616ddf95e1dcfd4.tar.gz |
Replace proto_tree_add_text in non-generated files
As requested by Michael Mann, most of the occurences of proto_tree_add_text/proto_item_add_subtree are replaced with proto_tree_add_subtree(_format) or proto_tree_add_item/proto_item_append_text in the non-generated files.
Change-Id: I27cccde88780adef43c78efd26333f47af098ad6
Reviewed-on: https://code.wireshark.org/review/4726
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/opcua/opcua_extensionobjecttable.c')
-rw-r--r-- | plugins/opcua/opcua_extensionobjecttable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/opcua/opcua_extensionobjecttable.c b/plugins/opcua/opcua_extensionobjecttable.c index fb34e9ccdf..cc4067c7a5 100644 --- a/plugins/opcua/opcua_extensionobjecttable.c +++ b/plugins/opcua/opcua_extensionobjecttable.c @@ -197,7 +197,7 @@ void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, { if (iLen == -1) { - proto_tree_add_text(tree, tvb, *pOffset, 4, "[OpcUa Null ByteString]"); + proto_tree_add_bytes_format(tree, hf_opcua_ByteString, tvb, *pOffset, 4, NULL, "[OpcUa Null ByteString]"); } else if (iLen >= 0) { @@ -206,8 +206,7 @@ void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, } else { - char *szValue = wmem_strdup_printf(wmem_packet_scope(), "[Invalid ByteString] Invalid length: %d", iLen); - proto_tree_add_text(tree, tvb, *pOffset, 4, "%s", szValue); + proto_tree_add_bytes_format(tree, hf_opcua_ByteString, tvb, *pOffset, 4, NULL, "[Invalid ByteString] Invalid length: %d", iLen); } } |