[pkg-opensc-commit] [opensc] 271/295: avoid logically dead code

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 32aa51a0f62c040fd04e71a4ab6990e717ddb2d9
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Tue Jun 6 00:50:29 2017 +0200

    avoid logically dead code
---
 src/libopensc/iso7816.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/libopensc/iso7816.c b/src/libopensc/iso7816.c
index b1d2c91..72fa6c4 100644
--- a/src/libopensc/iso7816.c
+++ b/src/libopensc/iso7816.c
@@ -1284,13 +1284,13 @@ int iso7816_read_binary_sfid(sc_card_t *card, unsigned char sfid,
 	}
 	*ef_len = 0;
 
-	if (read > 0xff+1)
-		sc_format_apdu(card, &apdu, SC_APDU_CASE_2_EXT,
-				ISO_READ_BINARY, ISO_P1_FLAG_SFID|sfid, 0);
-	else
-		sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT,
-				ISO_READ_BINARY, ISO_P1_FLAG_SFID|sfid, 0);
-
+#if MAX_SM_APDU_RESP_SIZE > (0xff+1)
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_2_EXT,
+			ISO_READ_BINARY, ISO_P1_FLAG_SFID|sfid, 0);
+#else
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT,
+			ISO_READ_BINARY, ISO_P1_FLAG_SFID|sfid, 0);
+#endif
 	p = realloc(*ef, read);
 	if (!p) {
 		r = SC_ERROR_OUT_OF_MEMORY;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list