forked from osmocom/wireshark
qnet6: use a simpler way to read a time field
Fix yet another occassion where we can call proto_tree_add_item() directly instead of parsing the time field ourselves.
This commit is contained in:
parent
e96a1082c0
commit
724a288560
|
@ -2487,7 +2487,6 @@ dissect_qnet6_kif_msgsend_msg_utime(tvbuff_t * tvb, packet_info * pinfo _U_, pro
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
gint combine_len, left;
|
gint combine_len, left;
|
||||||
nstime_t nt;
|
|
||||||
|
|
||||||
left = tvb_reported_length_remaining(tvb, *poffset);
|
left = tvb_reported_length_remaining(tvb, *poffset);
|
||||||
|
|
||||||
|
@ -2496,12 +2495,11 @@ dissect_qnet6_kif_msgsend_msg_utime(tvbuff_t * tvb, packet_info * pinfo _U_, pro
|
||||||
*poffset += 2;
|
*poffset += 2;
|
||||||
proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_curflag, tvb, *poffset, 4, encoding);
|
proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_curflag, tvb, *poffset, 4, encoding);
|
||||||
*poffset += 4;
|
*poffset += 4;
|
||||||
nt.nsecs = 0;
|
proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_actime,
|
||||||
nt.secs = tvb_get_guint32(tvb, *poffset, encoding);
|
tvb, *poffset, 4, ENC_TIME_SECS|encoding);
|
||||||
proto_tree_add_time(tree, hf_qnet6_kif_msg_io_utime_actime, tvb, *poffset, 4, &nt);
|
|
||||||
*poffset += 4;
|
*poffset += 4;
|
||||||
nt.secs = tvb_get_guint32(tvb, *poffset, encoding);
|
proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_modtime,
|
||||||
proto_tree_add_time(tree, hf_qnet6_kif_msg_io_utime_modtime, tvb, *poffset, 4, &nt);
|
tvb, *poffset, 4, ENC_TIME_SECS|encoding);
|
||||||
*poffset += 4;
|
*poffset += 4;
|
||||||
|
|
||||||
left -= 2 + 4 + 4 + 4;
|
left -= 2 + 4 + 4 + 4;
|
||||||
|
|
Loading…
Reference in New Issue