mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
style
This commit is contained in:
parent
278ec017fe
commit
df96b58fcc
3 changed files with 11 additions and 6 deletions
|
@ -123,7 +123,7 @@ void DbpStringEx(char *str, uint32_t cmd) {
|
||||||
data.flag = cmd;
|
data.flag = cmd;
|
||||||
uint16_t len = MIN(strlen(str), sizeof(data.buf));
|
uint16_t len = MIN(strlen(str), sizeof(data.buf));
|
||||||
memcpy(data.buf, str, len);
|
memcpy(data.buf, str, len);
|
||||||
reply_ng(CMD_DEBUG_PRINT_STRING, PM3_SUCCESS, (uint8_t*)&data, sizeof(data.flag) + len);
|
reply_ng(CMD_DEBUG_PRINT_STRING, PM3_SUCCESS, (uint8_t *)&data, sizeof(data.flag) + len);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ static void PacketResponseReceived(PacketResponseNG *packet) {
|
||||||
uint16_t flag;
|
uint16_t flag;
|
||||||
uint8_t buf[USB_CMD_DATA_SIZE - sizeof(uint16_t)];
|
uint8_t buf[USB_CMD_DATA_SIZE - sizeof(uint16_t)];
|
||||||
} PACKED;
|
} PACKED;
|
||||||
struct d* data = (struct d*)&packet->data.asBytes;
|
struct d *data = (struct d *)&packet->data.asBytes;
|
||||||
len = packet->length - sizeof(data->flag);
|
len = packet->length - sizeof(data->flag);
|
||||||
memcpy(s, data->buf, len);
|
memcpy(s, data->buf, len);
|
||||||
flag = data->flag;
|
flag = data->flag;
|
||||||
|
@ -617,7 +617,7 @@ bool WaitForResponseTimeoutW(uint32_t cmd, PacketResponseNG *response, size_t ms
|
||||||
response = &resp;
|
response = &resp;
|
||||||
|
|
||||||
// Add delay depending on the communication channel & speed
|
// Add delay depending on the communication channel & speed
|
||||||
if (ms_timeout != (size_t)-1)
|
if (ms_timeout != (size_t) -1)
|
||||||
ms_timeout += communication_delay();
|
ms_timeout += communication_delay();
|
||||||
|
|
||||||
timeout_start_time = msclock();
|
timeout_start_time = msclock();
|
||||||
|
@ -707,7 +707,7 @@ static bool dl_it(uint8_t *dest, uint32_t bytes, uint32_t start_index, PacketRes
|
||||||
timeout_start_time = msclock();
|
timeout_start_time = msclock();
|
||||||
|
|
||||||
// Add delay depending on the communication channel & speed
|
// Add delay depending on the communication channel & speed
|
||||||
if (ms_timeout != (size_t)-1)
|
if (ms_timeout != (size_t) -1)
|
||||||
ms_timeout += communication_delay();
|
ms_timeout += communication_delay();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
@ -480,9 +480,14 @@ static int unpack_object(scanner_t *s, json_t *root, va_list *ap) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (root && !json_is_object(root)) {
|
if (root && !json_is_object(root)) {
|
||||||
set_error(s, "<validation>", json_error_wrong_type, "Expected object, got %s",
|
set_error(s,
|
||||||
type_name(root));
|
"<validation>",
|
||||||
|
json_error_wrong_type,
|
||||||
|
"Expected object, got %s",
|
||||||
|
(root) ? type_name(root) : "NULL"
|
||||||
|
);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
next_token(s);
|
next_token(s);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue