aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-06-01 13:49:28 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2016-06-01 11:51:56 +0000
commit10f1ea6369796f68728e145d122ce44803806780 (patch)
tree2c9b63ab5f6dbbe78b2a2fea4022bccbd736212a /epan
parentb079151c6fe0a1c5ac25fc636f96b694eefb50c5 (diff)
at: remove an unnecessary if (tree) check
Change-Id: I2e7805edd3312b9e8dd4540c60eca195c0f36445 Reviewed-on: https://code.wireshark.org/review/15680 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-at.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/epan/dissectors/packet-at.c b/epan/dissectors/packet-at.c
index 8ef3b720fb..aa3b89d402 100644
--- a/epan/dissectors/packet-at.c
+++ b/epan/dissectors/packet-at.c
@@ -62,15 +62,14 @@ static int dissect_at(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "AT Command: %s",
tvb_format_text_wsp(tvb, 0, len));
- if (tree) {
- /* Start with a top-level item to add everything else to */
- item = proto_tree_add_item(tree, proto_at, tvb, 0, -1, ENC_NA);
- at_tree = proto_item_add_subtree(item, ett_at);
-
- /* Command */
- proto_tree_add_item(at_tree, hf_at_command, tvb, 0, len, ENC_ASCII|ENC_NA);
- proto_item_append_text(item, ": %s", tvb_format_text_wsp(tvb, 0, len));
- }
+ /* Start with a top-level item to add everything else to */
+ item = proto_tree_add_item(tree, proto_at, tvb, 0, -1, ENC_NA);
+ at_tree = proto_item_add_subtree(item, ett_at);
+
+ /* Command */
+ proto_tree_add_item(at_tree, hf_at_command, tvb, 0, len, ENC_ASCII|ENC_NA);
+ proto_item_append_text(item, ": %s", tvb_format_text_wsp(tvb, 0, len));
+
return tvb_captured_length(tvb);
}