diff --git a/armsrc/hitagS.c b/armsrc/hitagS.c index 684c83cbb..81ed771b4 100644 --- a/armsrc/hitagS.c +++ b/armsrc/hitagS.c @@ -454,7 +454,7 @@ static void hitagS_handle_reader_command(uint8_t *rx, const size_t rxlen, //add crc8 *txlen = 40; crc = CRC_PRESET; - calc_crc(&crc, tag.pages[1][2]), 8); + calc_crc(&crc, tag.pages[1][2], 8); calc_crc(&crc, tag.pwdh0, 8); calc_crc(&crc, tag.pwdl0, 8); calc_crc(&crc, tag.pwdl1, 8); diff --git a/armsrc/util.h b/armsrc/util.h index 40a7c3026..06c4e024e 100644 --- a/armsrc/util.h +++ b/armsrc/util.h @@ -55,15 +55,15 @@ #endif #ifndef REV16 -#define REV16(x) (REV8(x) + (REV8 (x >> 8) << 8)) +#define REV16(x) (REV8(x) + (REV8 ((x) >> 8) << 8)) #endif #ifndef REV32 -#define REV32(x) (REV16(x) + (REV16(x >> 16) << 16)) +#define REV32(x) (REV16(x) + (REV16((x) >> 16) << 16)) #endif #ifndef REV64 -#define REV64(x) (REV32(x) + (REV32(x >> 32) << 32)) +#define REV64(x) (REV32(x) + (REV32((x) >> 32) << 32)) #endif #ifndef BIT32