diff options
author | Michael Mann <mmann78@netscape.net> | 2014-06-20 17:34:10 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-06-22 14:34:17 +0000 |
commit | f5e2b4293d420fe8438075ebc8db76ac5f8b9747 (patch) | |
tree | ef3df7ea2b675bb726cba30c9fc62392236a5fbe /epan/dissectors/file-png.c | |
parent | 08bd0128ed786b95021b0e4e89838e8cf0742d74 (diff) |
convert to proto_tree_add_subtree[_format]
Change-Id: I358bfaa4e5d40cd01b766f614f8bd0dbaf611dd0
Reviewed-on: https://code.wireshark.org/review/2508
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/file-png.c')
-rw-r--r-- | epan/dissectors/file-png.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/file-png.c b/epan/dissectors/file-png.c index 4d19f19da8..6567b4ced9 100644 --- a/epan/dissectors/file-png.c +++ b/epan/dissectors/file-png.c @@ -457,7 +457,7 @@ dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *da while(tvb_reported_length_remaining(tvb, offset) > 0){ guint32 len_field; - proto_item *chunk_it, *len_it; + proto_item *len_it; proto_tree *chunk_tree; guint32 type; guint8 *type_str; @@ -470,9 +470,8 @@ dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *da tvb, offset+4, 4, ENC_ASCII|ENC_NA); /* 4 byte len field, 4 byte chunk type, 4 byte CRC */ - chunk_it = proto_tree_add_text(tree, tvb, offset, 4+4+len_field+4, "%s (%s)", - val_to_str_const(type, chunk_types, "unknown"), type_str); - chunk_tree = proto_item_add_subtree(chunk_it, ett_png_chunk); + chunk_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4+4+len_field+4, ett_png_chunk, NULL, + "%s (%s)", val_to_str_const(type, chunk_types, "unknown"), type_str); len_it = proto_tree_add_item(chunk_tree, &hfi_png_chunk_len, tvb, offset, 4, ENC_BIG_ENDIAN); |