From: Klas Lindfors Date: Fri, 10 Jan 2014 10:10:11 +0000 (+0100) Subject: miss-commited stuff X-Git-Tag: v1.15.0~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1cfb7777c1218793dc9d5f27b0904148c3f71b8;p=yubikey-personalization miss-commited stuff reverted parts of 944e83959d61890503610b902165872a8e9f9e81 --- diff --git a/ykcore/ykcore.c b/ykcore/ykcore.c index 85ff347..7fa4b5b 100644 --- a/ykcore/ykcore.c +++ b/ykcore/ykcore.c @@ -482,13 +482,8 @@ int yk_wait_for_key_status(YK_KEY *yk, uint8_t slot, unsigned int flags, /* Read a status report from the key */ memset(data, 0, sizeof(data)); - if (!_ykusb_read(yk, REPORT_TYPE_FEATURE, slot, (char *) &data, FEATURE_RPT_SIZE)) { - if(yk_errno == YK_ENODATA) { - yk_errno = 0; - continue; - } + if (!_ykusb_read(yk, REPORT_TYPE_FEATURE, slot, (char *) &data, FEATURE_RPT_SIZE)) return 0; - } if (last_data != NULL) memcpy(last_data, data, sizeof(data));