aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-netbios.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-netbios.c')
-rw-r--r--epan/dissectors/packet-netbios.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-netbios.c b/epan/dissectors/packet-netbios.c
index a4309eed97..0a9c22e900 100644
--- a/epan/dissectors/packet-netbios.c
+++ b/epan/dissectors/packet-netbios.c
@@ -354,7 +354,6 @@ netbios_add_name(const char* label, tvbuff_t *tvb, int offset, proto_tree *tree)
{/* add a name field display tree. Display the name and station type in sub-tree */
proto_tree *field_tree;
- proto_item *tf;
char name_str[(NETBIOS_NAME_LEN - 1)*4 + 1];
int name_type;
const char *name_type_str;
@@ -362,10 +361,9 @@ netbios_add_name(const char* label, tvbuff_t *tvb, int offset, proto_tree *tree)
/* decode the name field */
name_type = get_netbios_name( tvb, offset, name_str, (NETBIOS_NAME_LEN - 1)*4 + 1);
name_type_str = netbios_name_type_descr(name_type);
- tf = proto_tree_add_text( tree, tvb, offset, NETBIOS_NAME_LEN,
- "%s: %s<%02x> (%s)", label, name_str, name_type, name_type_str);
+ field_tree = proto_tree_add_subtree_format( tree, tvb, offset, NETBIOS_NAME_LEN,
+ ett_netb_name, NULL, "%s: %s<%02x> (%s)", label, name_str, name_type, name_type_str);
- field_tree = proto_item_add_subtree( tf, ett_netb_name);
proto_tree_add_string_format( field_tree, hf_netb_nb_name, tvb, offset,
15, name_str, "%s", name_str);
proto_tree_add_uint_format( field_tree, hf_netb_nb_name_type, tvb, offset + 15, 1, name_type,