mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 06:13:51 -07:00
fix redundantassignment
This commit is contained in:
parent
2635ae43b7
commit
17c9bc8fc2
1 changed files with 6 additions and 5 deletions
|
@ -605,24 +605,25 @@ int TestProxmark(void) {
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandNG(CMD_PING, data, len);
|
SendCommandNG(CMD_PING, data, len);
|
||||||
|
|
||||||
uint32_t timeout = 1000;
|
uint32_t timeout;
|
||||||
|
|
||||||
#ifdef USART_SLOW_LINK
|
#ifdef USART_SLOW_LINK
|
||||||
// 10s timeout for slow FPC, e.g. over BT
|
// 10s timeout for slow FPC, e.g. over BT
|
||||||
// as this is the very first command sent to the pm3
|
// as this is the very first command sent to the pm3
|
||||||
// that initiates the BT connection
|
// that initiates the BT connection
|
||||||
timeout = 10000;
|
timeout = 10000;
|
||||||
|
#else
|
||||||
|
timeout = 1000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (WaitForResponseTimeoutW(CMD_PING, &resp, timeout, false) == 0) {
|
if (WaitForResponseTimeoutW(CMD_PING, &resp, timeout, false) == 0) {
|
||||||
return PM3_ETIMEOUT;
|
return PM3_ETIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool error = false;
|
bool error = memcmp(data, resp.data.asBytes, len) != 0;
|
||||||
error = memcmp(data, resp.data.asBytes, len) != 0;
|
if (error) {
|
||||||
|
|
||||||
if (error)
|
|
||||||
return PM3_EIO;
|
return PM3_EIO;
|
||||||
|
}
|
||||||
|
|
||||||
SendCommandNG(CMD_CAPABILITIES, NULL, 0);
|
SendCommandNG(CMD_CAPABILITIES, NULL, 0);
|
||||||
if (WaitForResponseTimeoutW(CMD_CAPABILITIES, &resp, 1000, false) == 0) {
|
if (WaitForResponseTimeoutW(CMD_CAPABILITIES, &resp, 1000, false) == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue