Reduce some var scopes

This commit is contained in:
Philippe Teuwen
2019-06-07 18:41:39 +02:00
parent ac6b0ec1ce
commit 732bc766f9
52 changed files with 318 additions and 409 deletions

View File

@@ -279,14 +279,13 @@ static int CodeCmp(const char *code1, const char *code2) {
const APDUCode *GetAPDUCode(uint8_t sw1, uint8_t sw2) {
char buf[6] = {0};
int res;
int mineq = APDUCodeTableLen;
int mineqindx = 0;
sprintf(buf, "%02X%02X", sw1, sw2);
for (int i = 0; i < APDUCodeTableLen; i++) {
res = CodeCmp(APDUCodeTable[i].ID, buf);
int res = CodeCmp(APDUCodeTable[i].ID, buf);
// equal
if (res == 0) {