summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-vnc.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-06-19 16:40:49 -0700
committerMartin Kaiser <wireshark@kaiser.cx>2014-06-20 16:22:52 +0000
commitffccb9c069490bbe50f31ccbca360eab6084a349 (patch)
treef3a047ef7367ac5431874fcd93fec4dff723845f /epan/dissectors/packet-vnc.c
parentd91953f58f661b4d25f8aa98a8a1cee053fd5dc9 (diff)
downloadwireshark-ffccb9c069490bbe50f31ccbca360eab6084a349.tar.gz
no need for if(tree)
Change-Id: I5762fb30f57d0f9bc3e5fc786577ed1cc49b64d7 Reviewed-on: https://code.wireshark.org/review/2481 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-vnc.c')
-rw-r--r--epan/dissectors/packet-vnc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c
index 04449309fb..6ebdf47cdb 100644
--- a/epan/dissectors/packet-vnc.c
+++ b/epan/dissectors/packet-vnc.c
@@ -831,8 +831,8 @@ dissect_vnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint offset = 0;
/* Set up structures needed to add the protocol subtree and manage it */
- proto_item *ti = NULL;
- proto_tree *vnc_tree = NULL;
+ proto_item *ti;
+ proto_tree *vnc_tree;
conversation_t *conversation;
vnc_conversation_t *per_conversation_info;
@@ -860,10 +860,8 @@ dissect_vnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
/* create display subtree for the protocol */
- if(tree) {
- ti = proto_tree_add_item(tree, proto_vnc, tvb, 0, -1, ENC_NA);
- vnc_tree = proto_item_add_subtree(ti, ett_vnc);
- }
+ ti = proto_tree_add_item(tree, proto_vnc, tvb, 0, -1, ENC_NA);
+ vnc_tree = proto_item_add_subtree(ti, ett_vnc);
offset = 0; /* Start at the beginning of the VNC protocol data */