From 89ed273e8136b5254ee2df8771c4cbdc3ca1599e Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 4 Nov 2019 17:32:29 +0100 Subject: [PATCH] cac1: Simplify the cycle definintion --- src/libopensc/card-cac1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libopensc/card-cac1.c b/src/libopensc/card-cac1.c index 08d62b62..a0c98bad 100644 --- a/src/libopensc/card-cac1.c +++ b/src/libopensc/card-cac1.c @@ -78,7 +78,7 @@ static int cac_cac1_get_certificate(sc_card_t *card, u8 **out_buf, size_t *out_l out_ptr = *out_buf ? *out_buf : buf; sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, CAC_INS_GET_CERTIFICATE, 0, 0 ); len = MIN(left, 100); - for (; left > 0;) { /* Increments for readability in the end of the function */ + while (left > 0) { apdu.resp = out_ptr; apdu.le = len; apdu.resplen = left;