From 1b0fd2389a978a0084f386909fcc060ebbdfa141 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 9 May 2020 14:41:12 +0200 Subject: [PATCH] Remove tautological-type-limit-compare --- client/src/cmdhflist.c | 2 +- client/src/emv/apduinfo.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index 16fdb309e..8ade2f7dc 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -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, "?"); } diff --git a/client/src/emv/apduinfo.c b/client/src/emv/apduinfo.c index bc8d3f8ae..2b319cbe8 100644 --- a/client/src/emv/apduinfo.c +++ b/client/src/emv/apduinfo.c @@ -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;