diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-05-18 19:14:21 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-05-18 19:14:21 +0000 |
commit | 79c4c2990bf2910870bf95b7e3e3678fa85879f2 (patch) | |
tree | 6b89d04d981f439f84f827c49ab6542aa5792cc2 /epan/dissectors/packet-vnc.c | |
parent | a9f463bee44a89c669d155f2e2d58b8a36c42cf2 (diff) | |
download | wireshark-79c4c2990bf2910870bf95b7e3e3678fa85879f2.tar.gz wireshark-79c4c2990bf2910870bf95b7e3e3678fa85879f2.tar.bz2 wireshark-79c4c2990bf2910870bf95b7e3e3678fa85879f2.zip |
Remove unnecessary tree checks pointed out by Stig.
svn path=/trunk/; revision=28396
Diffstat (limited to 'epan/dissectors/packet-vnc.c')
-rw-r--r-- | epan/dissectors/packet-vnc.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index 521e3d8c68..a64d750ca2 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -701,10 +701,8 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, if (!vnc_is_client_or_server_version_message(tvb)) return TRUE; /* we still hope to get a SERVER_VERSION message some day. Do not proceed yet */ - if (tree) { - proto_tree_add_item(tree, hf_vnc_server_proto_ver, tvb, 4, + proto_tree_add_item(tree, hf_vnc_server_proto_ver, tvb, 4, 7, FALSE); - } per_conversation_info->server_proto_ver = g_ascii_strtod((char *)tvb_get_ephemeral_string(tvb, 4, 7), NULL); @@ -722,10 +720,8 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, if (!vnc_is_client_or_server_version_message(tvb)) return TRUE; /* we still hope to get a CLIENT_VERSION message some day. Do not proceed yet */ - if (tree) { - proto_tree_add_item(tree, hf_vnc_client_proto_ver, tvb, - 4, 7, FALSE); - } + proto_tree_add_item(tree, hf_vnc_client_proto_ver, tvb, + 4, 7, FALSE); per_conversation_info->client_proto_ver = g_ascii_strtod((char *)tvb_get_ephemeral_string(tvb, 4, 7), NULL); @@ -763,24 +759,21 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, } else { /* Version < 3.007: The server decides the * authentication type for us to use */ - if (tree) { - proto_tree_add_item(tree, - hf_vnc_server_security_type, tvb, - offset, 4, FALSE); - } + proto_tree_add_item(tree, + hf_vnc_server_security_type, tvb, + offset, 4, FALSE); } per_conversation_info->vnc_next_state = SECURITY_TYPES; break; case SECURITY_TYPES : - if (check_col(pinfo->cinfo, COL_INFO)) + if (check_col(pinfo->cinfo, COL_INFO)) { col_set_str(pinfo->cinfo, COL_INFO, "Authentication type selected by client"); - if (tree) { - proto_tree_add_item(tree, hf_vnc_client_security_type, tvb, - offset, 1, FALSE); } + proto_tree_add_item(tree, hf_vnc_client_security_type, tvb, + offset, 1, FALSE); per_conversation_info->security_type_selected = tvb_get_guint8(tvb, offset); |