diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2020-06-09 22:44:36 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2020-07-19 19:07:50 +0000 |
commit | 6b5e95c47392a478f5972a2753c07063bac9688f (patch) | |
tree | b3990142c35a8845b95f5b70fb130d926312885c /epan/dissectors | |
parent | dc7f9353302fa1dd522a76130fa82c8d9fa62fbd (diff) |
opa-mad: use a simpler way to read a time field
There's no need parse the time field ourselves. proto_tree_add_item()
supports the encoding that is used here.
Change-Id: Ifd8cb77f1225b84b9eaccfb0cc23c9c413c6e77b
Reviewed-on: https://code.wireshark.org/review/37901
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-opa-mad.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-opa-mad.c b/epan/dissectors/packet-opa-mad.c index 3be4a9d5b5..4e7bb1f89b 100644 --- a/epan/dissectors/packet-opa-mad.c +++ b/epan/dissectors/packet-opa-mad.c @@ -7544,7 +7544,6 @@ static gint parse_GetImageInfo(proto_tree *parentTree, tvbuff_t *tvb, gint *offs proto_item *GetImageInfo_header_item; proto_tree *GetImageInfo_SM_tree; guint32 numSMs; - nstime_t ts; gint local_offset = *offset; @@ -7556,9 +7555,8 @@ static gint parse_GetImageInfo(proto_tree *parentTree, tvbuff_t *tvb, gint *offs local_offset = parse_Image(GetImageInfo_header_tree, tvb, &local_offset); - ts.secs = (time_t)tvb_get_guint64(tvb, local_offset, ENC_BIG_ENDIAN); - ts.nsecs = 0; - proto_tree_add_time(GetImageInfo_header_tree, hf_opa_GetImageInfo_sweepStart, tvb, local_offset, 8, &ts); + proto_tree_add_item(GetImageInfo_header_tree, hf_opa_GetImageInfo_sweepStart, + tvb, local_offset, 8, ENC_TIME_SECS|ENC_BIG_ENDIAN); local_offset += 8; proto_tree_add_item(GetImageInfo_header_tree, hf_opa_GetImageInfo_sweepDuration, tvb, local_offset, 4, ENC_BIG_ENDIAN); local_offset += 4; |