diff options
author | Michael Mann <mmann78@netscape.net> | 2016-12-15 13:01:27 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-12-16 03:04:11 +0000 |
commit | 232cb9a2dd87ea9cc9c88d4c32bfb7b452705130 (patch) | |
tree | ff1b2039727322c1f8e332f2040f0ba5d83c4f43 /epan/dissectors/packet-spice.c | |
parent | 8efb7fece1ffefd26dacd79f5ec8722c4e01e827 (diff) |
Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.
Many proto_item_append_text calls were just adding a unit string to a field.
There's a better way to do that now.
Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78
Reviewed-on: https://code.wireshark.org/review/19289
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-spice.c')
-rw-r--r-- | epan/dissectors/packet-spice.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-spice.c b/epan/dissectors/packet-spice.c index 7aaf66065f..ba87f8ed55 100644 --- a/epan/dissectors/packet-spice.c +++ b/epan/dissectors/packet-spice.c @@ -1226,7 +1226,6 @@ dissect_ImageZLIB_GLZ_stream(tvbuff_t *tvb, proto_tree *ZLIB_GLZ_tree, packet_in static guint32 dissect_ImageZLIB_GLZ(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset) { - proto_item *ti; proto_tree *ZLIB_GLZ_tree; guint32 ZLIB_GLZSize, ZLIB_uncompSize; @@ -1235,11 +1234,9 @@ dissect_ImageZLIB_GLZ(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint if (tree) { ZLIB_GLZ_tree = proto_tree_add_subtree(tree, tvb, offset, ZLIB_GLZSize + 8, ett_ZLIB_GLZ, NULL, "ZLIB over GLZ Image"); - ti = proto_tree_add_item(ZLIB_GLZ_tree, hf_zlib_uncompress_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); - proto_item_append_text(ti, " bytes"); + proto_tree_add_item(ZLIB_GLZ_tree, hf_zlib_uncompress_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; - ti = proto_tree_add_item(ZLIB_GLZ_tree, hf_zlib_compress_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); - proto_item_append_text(ti, " bytes"); + proto_tree_add_item(ZLIB_GLZ_tree, hf_zlib_compress_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; dissect_ImageZLIB_GLZ_stream(tvb, ZLIB_GLZ_tree, pinfo, offset, ZLIB_GLZSize, ZLIB_uncompSize); } @@ -4211,12 +4208,12 @@ proto_register_spice(void) }, { &hf_zlib_uncompress_size, { "ZLIB stream uncompressed size", "spice.zlib_uncompress_size", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_byte_bytes, 0x0, NULL, HFILL } }, { &hf_zlib_compress_size, { "ZLIB stream compressed size", "spice.zlib_compress_size", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_byte_bytes, 0x0, NULL, HFILL } }, { &hf_rect_left, |