coverity 226308

This commit is contained in:
iceman1001 2019-10-10 11:13:14 +02:00
parent 49caa7f962
commit 371a0e3ee0
2 changed files with 3 additions and 3 deletions

View file

@ -363,7 +363,7 @@ void annotateIclass(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
snprintf(exp, size, "UPDATE(%d)", cmd[1]); snprintf(exp, size, "UPDATE(%d)", cmd[1]);
break; break;
case ICLASS_CMD_READCHECK: case ICLASS_CMD_READCHECK:
if (ICLASS_CREDIT(c)) { if (ICLASS_CREDIT(cmd[0])) {
snprintf(exp, size, "READCHECK[Kc](%d)", cmd[1]); snprintf(exp, size, "READCHECK[Kc](%d)", cmd[1]);
} else { } else {
snprintf(exp, size, "READCHECK[Kd](%d)", cmd[1]); snprintf(exp, size, "READCHECK[Kd](%d)", cmd[1]);

View file

@ -133,8 +133,8 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
#define ICLASS_CMD_READ_OR_IDENTIFY 0xC #define ICLASS_CMD_READ_OR_IDENTIFY 0xC
#define ICLASS_CMD_ACT 0xE #define ICLASS_CMD_ACT 0xE
#define ICLASS_CREDIT(x) (((x) & 0x5) == 0x5) #define ICLASS_CREDIT(x) (((x) & 0x10) == 0x10)
#define ICLASS_DEBIT(x) (((x) & 0x5) == 0) #define ICLASS_DEBIT(x) !(ICLASS_CREDIT(x))
#define ISO14443A_CMD_REQA 0x26 #define ISO14443A_CMD_REQA 0x26