aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-egd.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-07-01 13:03:24 -0700
committerGuy Harris <guy@alum.mit.edu>2018-07-01 20:04:06 +0000
commite68ec5385267a9dab9d9b1ce4e88ab32750aee65 (patch)
tree1a90f612f4255a6399311774bbb544bccfb9d24c /epan/dissectors/packet-egd.c
parent0f21f9674d362b9fcb2c4fc36df2ad7d5d67b9aa (diff)
Use proto_tree_add_item() to add a seconds/nanoseconds value.
Change-Id: Ie019d33153afa38e1b1fb4a142c981458758910b Reviewed-on: https://code.wireshark.org/review/28557 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-egd.c')
-rw-r--r--epan/dissectors/packet-egd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/epan/dissectors/packet-egd.c b/epan/dissectors/packet-egd.c
index 078468e56a..9c9c73f8e1 100644
--- a/epan/dissectors/packet-egd.c
+++ b/epan/dissectors/packet-egd.c
@@ -92,9 +92,7 @@ static int dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
tvbuff_t *next_tvb = NULL;
gint offset, data_length;
guint32 sectime;
- nstime_t egd_time;
- memset(&egd_time, 0, sizeof(nstime_t));
offset = 0;
ti = proto_tree_add_item(tree, proto_egd, tvb, 0, -1, ENC_NA);
@@ -119,9 +117,7 @@ static int dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
}
else
{
- egd_time.secs = tvb_get_letohl(tvb, offset);
- egd_time.nsecs = tvb_get_letohl(tvb, offset+4);
- proto_tree_add_time(egd_tree, hf_egd_time, tvb, offset, 8, &egd_time);
+ proto_tree_add_item(egd_tree, hf_egd_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
}
offset += 8;