aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-time.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-12-16 10:10:29 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-12-16 10:10:29 +0000
commita6a53d250d440bfb4556715ed04ccc249e2d624f (patch)
tree7ab255b28efb31d0a38cadb2e84feb170d737012 /epan/dissectors/packet-time.c
parent9e5143f1a780deda8c5bd15634d24ec08c95c3b1 (diff)
no need for if(tree)
svn path=/trunk/; revision=54140
Diffstat (limited to 'epan/dissectors/packet-time.c')
-rw-r--r--epan/dissectors/packet-time.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/epan/dissectors/packet-time.c b/epan/dissectors/packet-time.c
index 80cde533fe..694773939d 100644
--- a/epan/dissectors/packet-time.c
+++ b/epan/dissectors/packet-time.c
@@ -60,20 +60,17 @@ dissect_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_add_fstr(pinfo->cinfo, COL_INFO, "TIME %s",
pinfo->srcport == pinfo->match_uint ? "Response":"Request");
- if (tree) {
-
- ti = proto_tree_add_item(tree, proto_time, tvb, 0, -1, ENC_NA);
- time_tree = proto_item_add_subtree(ti, ett_time);
-
- proto_tree_add_text(time_tree, tvb, 0, 0,
- pinfo->srcport==pinfo->match_uint ? "Type: Response":"Type: Request");
- if (pinfo->srcport == pinfo->match_uint) {
- /* seconds since 1900-01-01 00:00:00 GMT, *not* 1970 */
- guint32 delta_seconds = tvb_get_ntohl(tvb, 0);
- proto_tree_add_uint_format(time_tree, hf_time_time, tvb, 0, 4,
- delta_seconds, "%s",
- abs_time_secs_to_str(delta_seconds-2208988800U, time_display_type, TRUE));
- }
+ ti = proto_tree_add_item(tree, proto_time, tvb, 0, -1, ENC_NA);
+ time_tree = proto_item_add_subtree(ti, ett_time);
+
+ proto_tree_add_text(time_tree, tvb, 0, 0,
+ pinfo->srcport==pinfo->match_uint ? "Type: Response":"Type: Request");
+ if (pinfo->srcport == pinfo->match_uint) {
+ /* seconds since 1900-01-01 00:00:00 GMT, *not* 1970 */
+ guint32 delta_seconds = tvb_get_ntohl(tvb, 0);
+ proto_tree_add_uint_format(time_tree, hf_time_time, tvb, 0, 4,
+ delta_seconds, "%s",
+ abs_time_secs_to_str(delta_seconds-2208988800U, time_display_type, TRUE));
}
}