diff options
author | Michael Mann <mmann78@netscape.net> | 2014-11-14 15:13:05 -0500 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-11-17 01:04:57 +0000 |
commit | 57b72275b7f5c5ef99208fbcf7aa6647451f4c4d (patch) | |
tree | b1db7d31d1be218be0aaeb3a5dfeaa9896e37227 /plugins/opcua | |
parent | 14bc6d88b12bfadb9efb20092ed517a330fe3a91 (diff) |
Eliminate proto_tree_add_text by formatting field hf_opcua_ByteString in a few places.
Change-Id: I9606aa36b7d7b6bb2ef2e7685e6629163ca83ef7
Reviewed-on: https://code.wireshark.org/review/5312
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: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'plugins/opcua')
-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 9ca5960b62..c829d8b5e0 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, packet_info *p { if (iLen == -1) { - proto_tree_add_text(tree, tvb, *pOffset, 4, "[OpcUa Null ByteString]"); + proto_tree_add_bytes_format_value(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, packet_info *p } 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_value(tree, hf_opcua_ByteString, tvb, *pOffset, 4, NULL, "[Invalid ByteString] Invalid length: %d", iLen); } } |