aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-websocket.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-12-30 16:47:30 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2014-12-30 15:52:05 +0000
commit1ee43690ae165567d81aba6ba5f94a56c0844b2c (patch)
treea7f6ef33149dff69916b0ef911c02d22ea8187ca /epan/dissectors/packet-websocket.c
parentd45fe5ce4c0fad21c0e1e048f871bcd3cd1ec099 (diff)
no need for if(tree)
Change-Id: I0b20b66e1b44da0362c13009946a69738a2aa267 Reviewed-on: https://code.wireshark.org/review/6138 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-websocket.c')
-rw-r--r--epan/dissectors/packet-websocket.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-websocket.c b/epan/dissectors/packet-websocket.c
index a8bff9bf9c..5604cd85bf 100644
--- a/epan/dissectors/packet-websocket.c
+++ b/epan/dissectors/packet-websocket.c
@@ -310,7 +310,7 @@ dissect_websocket(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
guint8 fin, opcode, mask;
guint length, short_length, payload_length, recurse_length;
guint payload_offset, mask_offset, recurse_offset;
- proto_tree *ws_tree = NULL;
+ proto_tree *ws_tree;
const guint8 *masking_key = NULL;
tvbuff_t *tvb_payload;
@@ -365,10 +365,8 @@ dissect_websocket(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WebSocket");
col_set_str(pinfo->cinfo, COL_INFO, "WebSocket");
- if (tree) {
- ti = proto_tree_add_item(tree, proto_websocket, tvb, 0, payload_offset, ENC_NA);
- ws_tree = proto_item_add_subtree(ti, ett_ws);
- }
+ ti = proto_tree_add_item(tree, proto_websocket, tvb, 0, payload_offset, ENC_NA);
+ ws_tree = proto_item_add_subtree(ti, ett_ws);
/* Flags */
proto_tree_add_item(ws_tree, hf_ws_fin, tvb, 0, 1, ENC_NA);