make style

This commit is contained in:
iceman1001 2023-07-24 17:42:27 +02:00
parent af0f513c84
commit 1a788b1c14
7 changed files with 796 additions and 796 deletions

View file

@ -624,7 +624,7 @@ static int CmdHF14AReader(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
} }
if ((disconnectAfter == false) && (silent == false)) { if ((disconnectAfter == false) && (silent == false)) {
PrintAndLogEx(SUCCESS, "Card is selected. You can now start sending commands"); PrintAndLogEx(SUCCESS, "Card is selected. You can now start sending commands");
} }
} }
plot: plot:

View file

@ -2825,7 +2825,7 @@ static int CmdHF15View(const char *Cmd) {
CLIParserInit(&ctx, "hf 15 view", CLIParserInit(&ctx, "hf 15 view",
"Print a ISO-15693 tag dump file (bin/eml/json)", "Print a ISO-15693 tag dump file (bin/eml/json)",
"hf 15 view -f hf-iclass-AA162D30F8FF12F1-dump.bin\n" "hf 15 view -f hf-iclass-AA162D30F8FF12F1-dump.bin\n"
); );
void *argtable[] = { void *argtable[] = {
arg_param_begin, arg_param_begin,
arg_str1("f", "file", "<fn>", "filename of dump (bin/eml/json)"), arg_str1("f", "file", "<fn>", "filename of dump (bin/eml/json)"),

View file

@ -1564,16 +1564,16 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
FILE *fnonces = NULL; FILE *fnonces = NULL;
// init to ZERO // init to ZERO
PacketResponseNG resp = { PacketResponseNG resp = {
.cmd = 0, .cmd = 0,
.length = 0, .length = 0,
.magic = 0, .magic = 0,
.status = 0, .status = 0,
.crc = 0, .crc = 0,
.ng = false, .ng = false,
}; };
resp.oldarg[0] = 0; resp.oldarg[0] = 0;
resp.oldarg[1] = 0; resp.oldarg[1] = 0;
resp.oldarg[2] = 0; resp.oldarg[2] = 0;
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE); memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);

View file

@ -751,10 +751,10 @@ bool WaitForResponseTimeoutW(uint32_t cmd, PacketResponseNG *response, size_t ms
resp.length = 0, resp.length = 0,
resp.magic = 0, resp.magic = 0,
resp.status = 0, resp.status = 0,
resp.crc = 0, resp.crc = 0,
resp.ng = false, resp.ng = false,
resp.oldarg[0] = 0; resp.oldarg[0] = 0;
resp.oldarg[1] = 0; resp.oldarg[1] = 0;
resp.oldarg[2] = 0; resp.oldarg[2] = 0;
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE); memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);
@ -832,10 +832,10 @@ bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint3
resp.length = 0, resp.length = 0,
resp.magic = 0, resp.magic = 0,
resp.status = 0, resp.status = 0,
resp.crc = 0, resp.crc = 0,
resp.ng = false, resp.ng = false,
resp.oldarg[0] = 0; resp.oldarg[0] = 0;
resp.oldarg[1] = 0; resp.oldarg[1] = 0;
resp.oldarg[2] = 0; resp.oldarg[2] = 0;
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE); memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);

File diff suppressed because it is too large Load diff

View file

@ -54,14 +54,14 @@
static inline uint16_t le16(uint16_t v) { static inline uint16_t le16(uint16_t v) {
return (uint16_t)( return (uint16_t)(
(v >> 8) | (v << 8) (v >> 8) | (v << 8)
); );
} }
static inline uint32_t le32(uint32_t v) { static inline uint32_t le32(uint32_t v) {
return (uint32_t)( return (uint32_t)(
(le16(v) << 16) | (le16(v >> 16)) (le16(v) << 16) | (le16(v >> 16))
); );
} }
#endif // HOST_LITTLE_ENDIAN #endif // HOST_LITTLE_ENDIAN

View file

@ -162,38 +162,38 @@ uint64_t bytes_to_num(uint8_t *src, size_t len) {
inline uint16_t MemLeToUint2byte(const uint8_t *data) { inline uint16_t MemLeToUint2byte(const uint8_t *data) {
return (uint16_t)( return (uint16_t)(
(data[1] << 8) + data[0] (data[1] << 8) + data[0]
); );
} }
inline uint32_t MemLeToUint3byte(const uint8_t *data) { inline uint32_t MemLeToUint3byte(const uint8_t *data) {
return (uint32_t)( return (uint32_t)(
(data[2] << 16) + (data[1] << 8) + data[0] (data[2] << 16) + (data[1] << 8) + data[0]
); );
} }
inline uint32_t MemLeToUint4byte(const uint8_t *data) { inline uint32_t MemLeToUint4byte(const uint8_t *data) {
return (uint32_t)( return (uint32_t)(
(data[3] << 24) + (data[2] << 16) + (data[1] << 8) + data[0] (data[3] << 24) + (data[2] << 16) + (data[1] << 8) + data[0]
); );
} }
inline uint16_t MemBeToUint2byte(const uint8_t *data) { inline uint16_t MemBeToUint2byte(const uint8_t *data) {
return (uint16_t)( return (uint16_t)(
(data[0] << 8) + data[1] (data[0] << 8) + data[1]
); );
} }
inline uint32_t MemBeToUint3byte(const uint8_t *data) { inline uint32_t MemBeToUint3byte(const uint8_t *data) {
return (uint32_t)( return (uint32_t)(
(data[0] << 16) + (data[1] << 8) + data[2] (data[0] << 16) + (data[1] << 8) + data[2]
); );
} }
inline uint32_t MemBeToUint4byte(const uint8_t *data) { inline uint32_t MemBeToUint4byte(const uint8_t *data) {
return (uint32_t)( return (uint32_t)(
(data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3] (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]
); );
} }
void Uint2byteToMemLe(uint8_t *data, uint16_t value) { void Uint2byteToMemLe(uint8_t *data, uint16_t value) {