summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-gsmtap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-13 14:26:27 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-13 22:56:50 +0000
commitb7f4e250599d7ea0452711d388c161fd4ef61c60 (patch)
tree0eb636cef1c72912cef640148b680d8ddabbed2d /epan/dissectors/packet-gsmtap.c
parenta869ec6f55160622a90bc437517dee91d57f85d5 (diff)
downloadwireshark-b7f4e250599d7ea0452711d388c161fd4ef61c60.tar.gz
Adjust proto_tree_add_uint_format_value calls to use unit string
Several calls to proto_tree_add_uint_format_value could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. There also a few cases where proto_tree_add_uint_format_value could just be proto_tree_add_uint. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d Reviewed-on: https://code.wireshark.org/review/19242 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-gsmtap.c')
-rw-r--r--epan/dissectors/packet-gsmtap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gsmtap.c b/epan/dissectors/packet-gsmtap.c
index d4709d030c..dcd1fc41b8 100644
--- a/epan/dissectors/packet-gsmtap.c
+++ b/epan/dissectors/packet-gsmtap.c
@@ -422,9 +422,8 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
gsmtap_tree = proto_item_add_subtree(ti, ett_gsmtap);
proto_tree_add_item(gsmtap_tree, hf_gsmtap_version,
tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_uint_format_value(gsmtap_tree, hf_gsmtap_hdrlen,
- tvb, offset+1, 1, hdr_len,
- "%u bytes", hdr_len);
+ proto_tree_add_uint(gsmtap_tree, hf_gsmtap_hdrlen,
+ tvb, offset+1, 1, hdr_len);
proto_tree_add_item(gsmtap_tree, hf_gsmtap_type,
tvb, offset+2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(gsmtap_tree, hf_gsmtap_timeslot,
@@ -599,7 +598,7 @@ proto_register_gsmtap(void)
{ &hf_gsmtap_version, { "Version", "gsmtap.version",
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
{ &hf_gsmtap_hdrlen, { "Header Length", "gsmtap.hdr_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_byte_bytes, 0, NULL, HFILL } },
{ &hf_gsmtap_type, { "Payload Type", "gsmtap.type",
FT_UINT8, BASE_DEC, VALS(gsmtap_types), 0, NULL, HFILL } },
{ &hf_gsmtap_timeslot, { "Time Slot", "gsmtap.ts",