iso7816.c: slightly clean up iso7816_delete_file()

Only set the APDU's data element for the APDU_CASE3_SHORT type;
no need to do it for the APDU_CASE_1 type.
This commit is contained in:
Peter Marschall 2011-08-28 11:15:38 +02:00
parent d505a55483
commit 93816b37cd
1 changed files with 1 additions and 1 deletions

View File

@ -676,10 +676,10 @@ static int iso7816_delete_file(sc_card_t *card, const sc_path_t *path)
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xE4, 0x00, 0x00);
apdu.lc = 2;
apdu.datalen = 2;
apdu.data = sbuf;
}
else /* No file ID given: means currently selected file */
sc_format_apdu(card, &apdu, SC_APDU_CASE_1, 0xE4, 0x00, 0x00);
apdu.data = sbuf;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, r, "APDU transmit failed");