aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-epl.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-07-01 20:32:52 -0700
committerGuy Harris <guy@alum.mit.edu>2018-07-02 03:33:31 +0000
commita7961382833ba83c614aa435060ebc50280f359d (patch)
treeffaf2049549b7be622224f9b532e22a5ec41afb0 /epan/dissectors/packet-epl.c
parente9dc611e4fbbd4c4f86dc546c11c096fd0870af0 (diff)
Use proto_tree_add_item() for a number of time values.
Change-Id: I862a7870d335f8b0b57d13e2981a8bb1a02b2726 Reviewed-on: https://code.wireshark.org/review/28563 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-epl.c')
-rw-r--r--epan/dissectors/packet-epl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c
index 9f347e3f53..45143d1d9f 100644
--- a/epan/dissectors/packet-epl.c
+++ b/epan/dissectors/packet-epl.c
@@ -2746,7 +2746,6 @@ dissect_epl_payload(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gin
static gint
dissect_epl_soc(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset)
{
- nstime_t nettime;
guint8 flags;
static const int * soc_flags[] = {
&hf_epl_soc_mc,
@@ -2767,12 +2766,11 @@ dissect_epl_soc(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint of
((EPL_SOC_MC_MASK & flags) >> 7), ((EPL_SOC_PS_MASK & flags) >> 6));
}
- nettime.secs = tvb_get_letohl(tvb, offset);
- nettime.nsecs = tvb_get_letohl(tvb, offset+4);
- proto_tree_add_time(epl_tree, hf_epl_soc_nettime, tvb, offset, 8, &nettime);
+ proto_tree_add_item(epl_tree, hf_epl_soc_nettime, tvb, offset, 8, ENC_TIME_TIMESPEC|ENC_LITTLE_ENDIAN);
+ offset += 8;
- proto_tree_add_item(epl_tree, hf_epl_soc_relativetime, tvb, offset+8, 8, ENC_LITTLE_ENDIAN);
- offset += 16;
+ proto_tree_add_item(epl_tree, hf_epl_soc_relativetime, tvb, offset, 8, ENC_TIME_TIMESPEC|ENC_LITTLE_ENDIAN);
+ offset += 8;
return offset;
}