From b446c36da63eeb7c539f534fe4f9aa6592622ed4 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 24 Jul 2023 21:04:32 +0200 Subject: [PATCH] style --- client/src/proxmark3.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 162bc7776..f6c25a9eb 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -282,19 +282,22 @@ check_script: // read script file if (fgets(script_cmd_buf, sizeof(script_cmd_buf), current_cmdscriptfile()) == NULL) { - if (!pop_cmdscriptfile()) + if (pop_cmdscriptfile() == false) { break; - + } goto check_script; - } else { - prompt_ctx = PROXPROMPT_CTX_SCRIPTFILE; - // remove linebreaks - strcleanrn(script_cmd_buf, sizeof(script_cmd_buf)); - - cmd = str_dup(script_cmd_buf); - if (cmd != NULL) - printprompt = true; } + + prompt_ctx = PROXPROMPT_CTX_SCRIPTFILE; + + // remove linebreaks + strcleanrn(script_cmd_buf, sizeof(script_cmd_buf)); + + cmd = str_dup(script_cmd_buf); + if (cmd != NULL) { + printprompt = true; + } + } else { // If there is a script command if (execCommand) { @@ -429,8 +432,9 @@ check_script: msleep(100); // Make sure command is sent before killing client } - while (current_cmdscriptfile()) + while (current_cmdscriptfile()) { pop_cmdscriptfile(); + } pm3line_flush_history();