From 65bd945b54b44e38d909653124761a51c13b2e32 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 5 May 2019 22:04:35 +0200 Subject: [PATCH] style --- client/cmdhf.c | 2 +- client/comms.c | 20 ++++++++++---------- client/proxmark3.c | 2 +- client/ui.c | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/cmdhf.c b/client/cmdhf.c index 40bd863cb..24d30d40c 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -91,7 +91,7 @@ int CmdHFTune(const char *Cmd) { PrintAndLogEx(WARNING, "Timeout while waiting for Proxmark HF measure, aborting"); return PM3_ETIMEOUT; } - if (resp.status!=PM3_EOPABORTED) + if (resp.status != PM3_EOPABORTED) return resp.status; return PM3_SUCCESS; } diff --git a/client/comms.c b/client/comms.c index 0acec93d4..516318df1 100644 --- a/client/comms.c +++ b/client/comms.c @@ -353,7 +353,7 @@ __attribute__((force_align_arg_pointer)) rxlen = 0; bool ACK_received = false; bool error = false; - + pthread_mutex_lock(&spMutex); if (uart_receive(sp, (uint8_t *)&rx_raw.pre, sizeof(PacketResponseNGPreamble), &rxlen) && (rxlen == sizeof(PacketResponseNGPreamble))) { @@ -463,9 +463,9 @@ __attribute__((force_align_arg_pointer)) error = true; } } - + pthread_mutex_unlock(&spMutex); - + // TODO if error, shall we resync ? pthread_mutex_lock(&txBufferMutex); @@ -484,7 +484,7 @@ __attribute__((force_align_arg_pointer)) } if (txBuffer_pending) { - + pthread_mutex_lock(&spMutex); if (txBufferNGLen) { // NG packet if (!uart_send(sp, (uint8_t *) &txBufferNG, txBufferNGLen)) { @@ -499,7 +499,7 @@ __attribute__((force_align_arg_pointer)) } } pthread_mutex_unlock(&spMutex); - + txBuffer_pending = false; // tell main thread that txBuffer is empty @@ -603,17 +603,17 @@ int TestProxmark(void) { if (conn.send_via_fpc_usart) { PrintAndLogEx(INFO, "UART Serial baudrate: " _YELLOW_("%u") "\n", conn.uart_speed); } - + // reconfigure. if (conn.send_via_fpc_usart == false) { #if defined(_WIN32) pthread_mutex_lock(&spMutex); -#endif +#endif int res = uart_reconfigure_timeouts(sp, UART_USB_CLIENT_RX_TIMEOUT_MS); #if defined(_WIN32) pthread_mutex_unlock(&spMutex); #endif - if ( res != PM3_SUCCESS ) { + if (res != PM3_SUCCESS) { PrintAndLogEx(ERR, "UART reconfigure failed"); return res; } @@ -696,7 +696,7 @@ bool WaitForResponseTimeoutW(uint32_t cmd, PacketResponseNG *response, size_t ms __atomic_store_n(&timeout_start_time, msclock(), __ATOMIC_SEQ_CST); uint64_t tmp_clk; - + // Wait until the command is received while (true) { @@ -780,7 +780,7 @@ static bool dl_it(uint8_t *dest, uint32_t bytes, uint32_t start_index, PacketRes uint32_t bytes_completed = 0; __atomic_store_n(&timeout_start_time, msclock(), __ATOMIC_SEQ_CST); uint64_t tmp_clk; - + // Add delay depending on the communication channel & speed if (ms_timeout != (size_t) -1) ms_timeout += communication_delay(); diff --git a/client/proxmark3.c b/client/proxmark3.c index 58b6a5325..170d97b58 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -496,7 +496,7 @@ int main(int argc, char *argv[]) { CloseProxmark(); session.pm3_present = false; } - + if (!session.pm3_present) PrintAndLogEx(INFO, "Running in " _YELLOW_("OFFLINE") "mode. Check \"%s -h\" if it's not what you want.\n", exec_name); diff --git a/client/ui.c b/client/ui.c index 8049f128f..a2a364536 100644 --- a/client/ui.c +++ b/client/ui.c @@ -84,7 +84,7 @@ void PrintAndLogEx(logLevel_t level, const char *fmt, ...) { case WARNING: strncpy(prefix, _CYAN_("[!]"), sizeof(prefix) - 1); break; - case INFO: + case INFO: strncpy(prefix, _YELLOW_("[=]"), sizeof(prefix) - 1); break; case NORMAL: