diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-01-09 21:57:08 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-01-09 21:57:08 +0000 |
commit | 4e9a407c6fadae3ecad290a9b342532df5ce5837 (patch) | |
tree | 6360fc7742ad39c58d1c64b5a1b8d8e20a38d080 | |
parent | 0a8073c567bc4f0b3b9eda34de4e076849b1b49f (diff) |
remove unnecessary NULL checks
svn path=/trunk/; revision=47006
-rw-r--r-- | epan/dissectors/packet-iso7816.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/epan/dissectors/packet-iso7816.c b/epan/dissectors/packet-iso7816.c index 03c384cc6b..3e77880441 100644 --- a/epan/dissectors/packet-iso7816.c +++ b/epan/dissectors/packet-iso7816.c @@ -443,11 +443,9 @@ dissect_iso7816(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISO 7816"); col_clear(pinfo->cinfo, COL_INFO); - if (tree) { - tree_ti = proto_tree_add_protocol_format(tree, proto_iso7816, - tvb, 0, tvb_reported_length(tvb), "ISO 7816"); - iso7816_tree = proto_item_add_subtree(tree_ti, ett_iso7816); - } + tree_ti = proto_tree_add_protocol_format(tree, proto_iso7816, + tvb, 0, tvb_reported_length(tvb), "ISO 7816"); + iso7816_tree = proto_item_add_subtree(tree_ti, ett_iso7816); /* per our definition, sent/received is from the perspective of the interface i.e sent is from interface to card, received is from card to interface */ @@ -456,8 +454,7 @@ dissect_iso7816(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data (int)strlen(ADDR_INTF)+1, ADDR_INTF); SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int)strlen(ADDR_CARD)+1, ADDR_CARD); - if (tree_ti) - proto_item_append_text(tree_ti, " Command APDU"); + proto_item_append_text(tree_ti, " Command APDU"); offset = dissect_iso7816_cmd_apdu(tvb, pinfo, iso7816_tree); } else if (pinfo->p2p_dir==P2P_DIR_RECV) { @@ -473,8 +470,7 @@ dissect_iso7816(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data is_atr = TRUE; } if (!is_atr) { - if (tree_ti) - proto_item_append_text(tree_ti, " Response APDU"); + proto_item_append_text(tree_ti, " Response APDU"); offset = dissect_iso7816_resp_apdu(tvb, pinfo, iso7816_tree); } } |