remove unnecessary NULL checks
svn path=/trunk/; revision=47006
This commit is contained in:
parent
0a8073c567
commit
4e9a407c6f
|
@ -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_set_str(pinfo->cinfo, COL_PROTOCOL, "ISO 7816");
|
||||||
col_clear(pinfo->cinfo, COL_INFO);
|
col_clear(pinfo->cinfo, COL_INFO);
|
||||||
|
|
||||||
if (tree) {
|
|
||||||
tree_ti = proto_tree_add_protocol_format(tree, proto_iso7816,
|
tree_ti = proto_tree_add_protocol_format(tree, proto_iso7816,
|
||||||
tvb, 0, tvb_reported_length(tvb), "ISO 7816");
|
tvb, 0, tvb_reported_length(tvb), "ISO 7816");
|
||||||
iso7816_tree = proto_item_add_subtree(tree_ti, ett_iso7816);
|
iso7816_tree = proto_item_add_subtree(tree_ti, ett_iso7816);
|
||||||
}
|
|
||||||
|
|
||||||
/* per our definition, sent/received is from the perspective of the interface
|
/* 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 */
|
i.e sent is from interface to card, received is from card to interface */
|
||||||
|
@ -456,7 +454,6 @@ dissect_iso7816(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
||||||
(int)strlen(ADDR_INTF)+1, ADDR_INTF);
|
(int)strlen(ADDR_INTF)+1, ADDR_INTF);
|
||||||
SET_ADDRESS(&pinfo->dst, AT_STRINGZ,
|
SET_ADDRESS(&pinfo->dst, AT_STRINGZ,
|
||||||
(int)strlen(ADDR_CARD)+1, ADDR_CARD);
|
(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);
|
offset = dissect_iso7816_cmd_apdu(tvb, pinfo, iso7816_tree);
|
||||||
}
|
}
|
||||||
|
@ -473,7 +470,6 @@ dissect_iso7816(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
||||||
is_atr = TRUE;
|
is_atr = TRUE;
|
||||||
}
|
}
|
||||||
if (!is_atr) {
|
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);
|
offset = dissect_iso7816_resp_apdu(tvb, pinfo, iso7816_tree);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue