Remove tautological-type-limit-compare

This commit is contained in:
Philippe Teuwen 2020-05-09 14:41:12 +02:00
commit 1b0fd2389a
2 changed files with 3 additions and 3 deletions

View file

@ -509,7 +509,7 @@ void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
if (cmd[1] >= 0x2D && cmd[1] <= 0x9F) snprintf(exp, size, "Optional RFU");
else if (cmd[1] >= 0xA0 && cmd[1] <= 0xDF) snprintf(exp, size, "Cust IC MFG dependent");
else if (cmd[1] >= 0xE0 && cmd[1] <= 0xFF) snprintf(exp, size, "Proprietary IC MFG dependent");
else if (cmd[1] >= 0xE0) snprintf(exp, size, "Proprietary IC MFG dependent");
else
snprintf(exp, size, "?");
}

View file

@ -425,7 +425,7 @@ int APDUEncode(APDUStruct *apdu, uint8_t *data, int *len) {
if (len)
*len = 0;
if (apdu->le > 0x10000 || apdu->lc > 0xffff)
if (apdu->le > 0x10000)
return 1;
size_t dptr = 0;
@ -434,7 +434,7 @@ int APDUEncode(APDUStruct *apdu, uint8_t *data, int *len) {
data[dptr++] = apdu->p1;
data[dptr++] = apdu->p2;
if (apdu->lc) {
if (apdu->lc) { // apdu->lc is uint16_t so max 0xffff
if (apdu->extended_apdu || apdu->lc > 0xff || apdu->le > 0x100) {
data[dptr++] = 0x00;
data[dptr++] = (apdu->lc >> 8) & 0xff;