From 17c9bc8fc2f3b6f2d43e1735ddcb83fa7e5df6e1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 27 May 2020 22:46:22 +0200 Subject: [PATCH] fix redundantassignment --- client/src/comms.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/comms.c b/client/src/comms.c index d2ba5436f..0a49e1f31 100644 --- a/client/src/comms.c +++ b/client/src/comms.c @@ -605,24 +605,25 @@ int TestProxmark(void) { clearCommandBuffer(); SendCommandNG(CMD_PING, data, len); - uint32_t timeout = 1000; + uint32_t timeout; #ifdef USART_SLOW_LINK // 10s timeout for slow FPC, e.g. over BT // as this is the very first command sent to the pm3 // that initiates the BT connection timeout = 10000; +#else + timeout = 1000; #endif if (WaitForResponseTimeoutW(CMD_PING, &resp, timeout, false) == 0) { return PM3_ETIMEOUT; } - bool error = false; - error = memcmp(data, resp.data.asBytes, len) != 0; - - if (error) + bool error = memcmp(data, resp.data.asBytes, len) != 0; + if (error) { return PM3_EIO; + } SendCommandNG(CMD_CAPABILITIES, NULL, 0); if (WaitForResponseTimeoutW(CMD_CAPABILITIES, &resp, 1000, false) == 0) {