aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-15 13:01:27 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-16 03:04:11 +0000
commit232cb9a2dd87ea9cc9c88d4c32bfb7b452705130 (patch)
treeff1b2039727322c1f8e332f2040f0ba5d83c4f43 /epan/dissectors/packet-ipsec.c
parent8efb7fece1ffefd26dacd79f5ec8722c4e01e827 (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-ipsec.c')
-rw-r--r--epan/dissectors/packet-ipsec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c
index 0d13dc9476..571c15a8f0 100644
--- a/epan/dissectors/packet-ipsec.c
+++ b/epan/dissectors/packet-ipsec.c
@@ -1120,7 +1120,7 @@ static int
dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
proto_tree *ah_tree, *root_tree;
- proto_item *pi, *ti;
+ proto_item *pi;
guint ah_nxt; /* Next header */
guint8 ah_len; /* Length of header in 32bit words minus 2 */
guint ah_hdr_len; /* Length of header in octets */
@@ -1153,8 +1153,7 @@ dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
ah_tree = proto_item_add_subtree(pi, ett_ah);
proto_tree_add_item(ah_tree, hf_ah_next_header, tvb, 0, 1, ENC_BIG_ENDIAN);
- ti = proto_tree_add_item(ah_tree, hf_ah_length, tvb, 1, 1, ENC_BIG_ENDIAN);
- proto_item_append_text(ti, " (%u bytes)", ah_hdr_len);
+ proto_tree_add_item(ah_tree, hf_ah_length, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(ah_tree, hf_ah_reserved, tvb, 2, 2, ENC_NA);
proto_tree_add_item_ret_uint(ah_tree, hf_ah_spi, tvb, 4, 4, ENC_BIG_ENDIAN, &ah_spi);
@@ -2268,7 +2267,7 @@ proto_register_ipsec(void)
{ "Next header", "ah.next_header", FT_UINT8, BASE_DEC | BASE_EXT_STRING, &ipproto_val_ext, 0x0,
NULL, HFILL }},
{ &hf_ah_length,
- { "Length", "ah.length", FT_UINT8, BASE_DEC, NULL, 0x0,
+ { "Length", "ah.length", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_byte_bytes, 0x0,
NULL, HFILL }},
{ &hf_ah_reserved,
{ "Reserved", "ah.reserved", FT_BYTES, BASE_NONE, NULL, 0x0,