aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cmp.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-cmp.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-cmp.c')
-rw-r--r--epan/dissectors/packet-cmp.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c
index 1c741e9bb6..1deb0388ef 100644
--- a/epan/dissectors/packet-cmp.c
+++ b/epan/dissectors/packet-cmp.c
@@ -1505,7 +1505,6 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
tvbuff_t *next_tvb;
guint32 pdu_len;
guint8 pdu_type;
- nstime_t ts;
proto_item *item=NULL;
proto_item *ti=NULL;
proto_tree *tree=NULL;
@@ -1553,9 +1552,7 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- ts.secs = tvb_get_ntohl(tvb, 4);
- ts.nsecs = 0;
- proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
+ proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, ENC_TIME_SECS|ENC_BIG_ENDIAN);
offset += 4;
break;
case CMP_TYPE_POLLREQ:
@@ -1568,9 +1565,7 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_next_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- ts.secs = tvb_get_ntohl(tvb, 4);
- ts.nsecs = 0;
- proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
+ proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, ENC_TIME_SECS|ENC_BIG_ENDIAN);
offset += 4;
next_tvb = tvb_new_subset_length_caplen(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
@@ -2350,7 +2345,7 @@ void proto_register_cmp(void) {
NULL, HFILL }},
/*--- End of included file: packet-cmp-hfarr.c ---*/
-#line 307 "./asn1/cmp/packet-cmp-template.c"
+#line 302 "./asn1/cmp/packet-cmp-template.c"
};
/* List of subtrees */
@@ -2408,7 +2403,7 @@ void proto_register_cmp(void) {
&ett_cmp_PollRepContent_item,
/*--- End of included file: packet-cmp-ettarr.c ---*/
-#line 313 "./asn1/cmp/packet-cmp-template.c"
+#line 308 "./asn1/cmp/packet-cmp-template.c"
};
module_t *cmp_module;
@@ -2495,7 +2490,7 @@ void proto_reg_handoff_cmp(void) {
/*--- End of included file: packet-cmp-dis-tab.c ---*/
-#line 378 "./asn1/cmp/packet-cmp-template.c"
+#line 373 "./asn1/cmp/packet-cmp-template.c"
inited = TRUE;
}