aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sync.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-sync.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-sync.c')
-rw-r--r--epan/dissectors/packet-sync.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-sync.c b/epan/dissectors/packet-sync.c
index 786bc6b24c..db16fd9e51 100644
--- a/epan/dissectors/packet-sync.c
+++ b/epan/dissectors/packet-sync.c
@@ -136,8 +136,7 @@ dissect_sync(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
/* Octet 2 - Time Stamp */
timestamp = tvb_get_ntohs(tvb, offset) * 10;
- item = proto_tree_add_uint(sync_tree, hf_sync_timestamp, tvb, offset, 2, timestamp);
- proto_item_append_text(item, " ms");
+ proto_tree_add_uint(sync_tree, hf_sync_timestamp, tvb, offset, 2, timestamp);
offset += 2;
/* Octet 4 - Packet Number */
@@ -239,7 +238,7 @@ proto_register_sync(void)
},
{ &hf_sync_timestamp,
{ "Timestamp", "sync.timestamp",
- FT_UINT16, BASE_DEC, NULL, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0,
"Relative time value for the starting time of a synchronisation sequence within the synchronisation period.", HFILL }
},
{ &hf_sync_packet_nr,