diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-26 19:28:01 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-09-27 15:44:53 +0000 |
commit | 6fad7d19e73be54c5426a6a5e97245c782e53b6c (patch) | |
tree | 41436d398cc6a6b73fc47050f0478ab7bb461173 /epan/dissectors/file-gif.c | |
parent | 65437a7c526c0f11d164ecd32b99c13a4f9ec5e6 (diff) |
Eliminate proto_tree_add_text from some dissectors.
Some other related cleanup.
Change-Id: I45f54032aa8318858f4ee784945b6f2ed163b6ea
Reviewed-on: https://code.wireshark.org/review/4328
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 'epan/dissectors/file-gif.c')
-rw-r--r-- | epan/dissectors/file-gif.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/epan/dissectors/file-gif.c b/epan/dissectors/file-gif.c index e8f9922089..2f00756a93 100644 --- a/epan/dissectors/file-gif.c +++ b/epan/dissectors/file-gif.c @@ -292,6 +292,12 @@ static header_field_info hfi_trailer GIF_HFI_INIT = HFILL }; +static header_field_info hfi_data_block GIF_HFI_INIT = + { "Data block", + IMG_GIF ".data_block", + FT_BYTES, BASE_NONE, NULL, 0x00, + NULL, HFILL }; + /* Initialize the subtree pointers */ static gint ett_gif = -1; @@ -496,8 +502,8 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) do { /* Read length of data block */ len = tvb_get_guint8(tvb, offset); - proto_tree_add_text(subtree, tvb, - offset, 1 + len, + proto_tree_add_bytes_format(subtree, hfi_data_block.id, tvb, + offset+1, len, NULL, "Data block (length = %u)", len); offset += (1 + len); item_len += (1 + len); @@ -575,8 +581,8 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) do { /* Read length of data block */ len = tvb_get_guint8(tvb, offset); - proto_tree_add_text(subtree, tvb, - offset, 1 + len, + proto_tree_add_bytes_format(subtree, hfi_data_block.id, tvb, + offset + 1, len, NULL, "Data block (length = %u)", len); offset += 1 + len; item_len += (1 + len); |