From 3317175a826bdb66130fc5ee7eb680f7f97b14e9 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 2 Nov 2024 15:14:55 +0100 Subject: [PATCH] style --- client/src/cmdhfthinfilm.c | 13 ++++++++++--- client/src/cmdlfem410x.c | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client/src/cmdhfthinfilm.c b/client/src/cmdhfthinfilm.c index 74a76e788..6a477e5f6 100644 --- a/client/src/cmdhfthinfilm.c +++ b/client/src/cmdhfthinfilm.c @@ -125,7 +125,7 @@ int infoThinFilm(bool verbose) { SendCommandNG(CMD_HF_THINFILM_READ, NULL, 0); PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_HF_THINFILM_READ, &resp, 1500)) { + if (WaitForResponseTimeout(CMD_HF_THINFILM_READ, &resp, 1500) == false) { PrintAndLogEx(WARNING, "timeout while waiting for reply."); return PM3_ETIMEOUT; } @@ -186,9 +186,16 @@ int CmdHfThinFilmSim(const char *Cmd) { int ret; while (!(ret = kbd_enter_pressed())) { - if (WaitForResponseTimeout(CMD_HF_THINFILM_SIMULATE, &resp, 500) == 0) continue; - if (resp.status != PM3_SUCCESS) break; + + if (WaitForResponseTimeout(CMD_HF_THINFILM_SIMULATE, &resp, 500) == 0) { + continue; + } + + if (resp.status != PM3_SUCCESS) { + break; + } } + if (ret) { PrintAndLogEx(INFO, "Client side interrupted"); PrintAndLogEx(WARNING, "Simulation still running on Proxmark3 till next command or button press"); diff --git a/client/src/cmdlfem410x.c b/client/src/cmdlfem410x.c index b8743998a..ebcd9ee8c 100644 --- a/client/src/cmdlfem410x.c +++ b/client/src/cmdlfem410x.c @@ -365,7 +365,7 @@ static int CmdEM410xDemod(const char *Cmd) { bool invert = arg_get_lit(ctx, 4); bool amplify = arg_get_lit(ctx, 5); uint8_t bin[512] = {0}; - int bin_len = sizeof(bin) - 1; // CLIGetStrWithReturn does not guarantee string to be null-terminated + int bin_len = sizeof(bin) - 1; // CLIGetStrWithReturn does not guarantee string to be null-terminated CLIGetStrWithReturn(ctx, 6, bin, &bin_len); CLIParserFree(ctx);