aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.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-cip.c
parenta869ec6f55160622a90bc437517dee91d57f85d5 (diff)
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-cip.c')
-rw-r--r--epan/dissectors/packet-cip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index 5fc4692b4d..dc45845957 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -6008,7 +6008,7 @@ dissect_cip_cm_timeout(proto_tree *cmd_tree, tvbuff_t *tvb, int offset)
/* Display the actual time out */
timeout = ( 1 << tick ) * timeout_tick;
- proto_tree_add_uint_format_value(cmd_tree, hf_cip_cm_timeout, tvb, offset, 2, timeout, "%dms", timeout);
+ proto_tree_add_uint(cmd_tree, hf_cip_cm_timeout, tvb, offset, 2, timeout);
}
static void
@@ -7872,7 +7872,7 @@ proto_register_cip(void)
{ &hf_cip_cm_priority, { "Priority", "cip.cm.priority", FT_UINT8, BASE_DEC, NULL, 0x10, NULL, HFILL }},
{ &hf_cip_cm_tick_time, { "Tick time", "cip.cm.tick_time", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
{ &hf_cip_cm_timeout_tick, { "Time-out ticks", "cip.cm.timeout_tick", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_cip_cm_timeout, { "Actual Time Out", "cip.cm.timeout", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_cip_cm_timeout, { "Actual Time Out", "cip.cm.timeout", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0, NULL, HFILL }},
{ &hf_cip_cm_ot_connid, { "O->T Network Connection ID", "cip.cm.ot_connid", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_cip_cm_to_connid, { "T->O Network Connection ID", "cip.cm.to_connid", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_cip_cm_conn_serial_num, { "Connection Serial Number", "cip.cm.conn_serial_num", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},