aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enttec.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-05-10 22:07:04 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2016-05-10 20:07:55 +0000
commit4072db70ad1197c4978ab9892cc00c21267a561d (patch)
tree7fca0630bb055f63ea58d6ae05e9d293bc7e7e4c /epan/dissectors/packet-enttec.c
parent88eb078d9ff5f9e069b43003c0455775f448b05d (diff)
enttec: uups, I forgot some if (tree) checks
Change-Id: Id092b91408cdac9e490cb060a3d95e4a1d78e4e6 Reviewed-on: https://code.wireshark.org/review/15338 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-enttec.c')
-rw-r--r--epan/dissectors/packet-enttec.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/epan/dissectors/packet-enttec.c b/epan/dissectors/packet-enttec.c
index ec39323450..7bc1d7cb4a 100644
--- a/epan/dissectors/packet-enttec.c
+++ b/epan/dissectors/packet-enttec.c
@@ -404,7 +404,7 @@ dissect_enttec_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
{
gint offset = 0;
guint32 head = 0;
- proto_tree *ti,*enttec_tree=NULL;
+ proto_tree *ti,*enttec_tree;
/*
* If not enough bytes for the header word, don't try to
@@ -431,17 +431,13 @@ dissect_enttec_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
val_to_str(head, enttec_head_vals, "Unknown (0x%08x)"));
- if (tree) {
- ti = proto_tree_add_item(tree, proto_enttec, tvb, offset, -1, ENC_NA);
- enttec_tree = proto_item_add_subtree(ti, ett_enttec);
- }
+ ti = proto_tree_add_item(tree, proto_enttec, tvb, offset, -1, ENC_NA);
+ enttec_tree = proto_item_add_subtree(ti, ett_enttec);
- if (enttec_tree) {
- proto_tree_add_item(enttec_tree, hf_enttec_head, tvb,
- offset, 4, ENC_BIG_ENDIAN );
+ proto_tree_add_item(enttec_tree, hf_enttec_head, tvb,
+ offset, 4, ENC_BIG_ENDIAN );
+ /* XXX - dissect the rest of the packet */
- /* XXX - dissect the rest of the packet */
- }
return tvb_captured_length(tvb);
}