make style

This commit is contained in:
tharexde 2020-09-23 23:44:01 +02:00
commit a27b3af4cb

View file

@ -629,7 +629,7 @@ int CmdEM4x50Read(const char *Cmd) {
//if (errors || strlen(Cmd) == 0 || etd.addr_given == false) //if (errors || strlen(Cmd) == 0 || etd.addr_given == false)
if (errors) if (errors)
return usage_lf_em4x50_read(); return usage_lf_em4x50_read();
return em4x50_read(&etd, NULL, true); return em4x50_read(&etd, NULL, true);
} }
@ -788,8 +788,8 @@ int CmdEM4x50Sim(const char *Cmd) {
case 'w': { case 'w': {
if (param_gethex(Cmd, cmdp + 1, etd.word, 8)) { if (param_gethex(Cmd, cmdp + 1, etd.word, 8)) {
PrintAndLogEx(FAILED, "\n word has to be 8 hex symbols\n"); PrintAndLogEx(FAILED, "\n word has to be 8 hex symbols\n");
return PM3_EINVARG; return PM3_EINVARG;
} }
bword = true; bword = true;
cmdp += 2; cmdp += 2;
@ -798,8 +798,8 @@ int CmdEM4x50Sim(const char *Cmd) {
case 'f': { case 'f': {
if (param_gethex(Cmd, cmdp + 1, etd.word, 8)) { if (param_gethex(Cmd, cmdp + 1, etd.word, 8)) {
PrintAndLogEx(FAILED, "\n word has to be 8 hex symbols\n"); PrintAndLogEx(FAILED, "\n word has to be 8 hex symbols\n");
return PM3_EINVARG; return PM3_EINVARG;
} }
bword = true; bword = true;
cmdp += 2; cmdp += 2;
@ -814,7 +814,7 @@ int CmdEM4x50Sim(const char *Cmd) {
} }
if (errors || !bword) if (errors || !bword)
return usage_lf_em4x50_sim(); return usage_lf_em4x50_sim();
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_LF_EM4X50_SIM, (uint8_t *)&etd, sizeof(etd)); SendCommandNG(CMD_LF_EM4X50_SIM, (uint8_t *)&etd, sizeof(etd));
@ -827,9 +827,9 @@ int CmdEM4x50Sim(const char *Cmd) {
// print response // print response
bool isOK = resp.status; bool isOK = resp.status;
if (isOK) { if (isOK) {
PrintAndLogEx(SUCCESS,"\nsimulation data " _GREEN_("ok") "\n"); PrintAndLogEx(SUCCESS, "\nsimulation data " _GREEN_("ok") "\n");
} else { } else {
PrintAndLogEx(FAILED,"\nsimulating data " _RED_("failed") "\n"); PrintAndLogEx(FAILED, "\nsimulating data " _RED_("failed") "\n");
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -878,7 +878,7 @@ int CmdEM4x50Test(const char *Cmd) {
} }
if (errors) if (errors)
return usage_lf_em4x50_test(); return usage_lf_em4x50_test();
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_LF_EM4X50_TEST, (uint8_t *)&etd, sizeof(etd)); SendCommandNG(CMD_LF_EM4X50_TEST, (uint8_t *)&etd, sizeof(etd));
@ -891,9 +891,9 @@ int CmdEM4x50Test(const char *Cmd) {
// print response // print response
bool isOK = resp.status; bool isOK = resp.status;
if (isOK) { if (isOK) {
PrintAndLogEx(SUCCESS,"\ntest " _GREEN_("ok") "\n"); PrintAndLogEx(SUCCESS, "\ntest " _GREEN_("ok") "\n");
} else { } else {
PrintAndLogEx(FAILED,"\ntest " _RED_("failed") "\n"); PrintAndLogEx(FAILED, "\ntest " _RED_("failed") "\n");
return PM3_ESOFT; return PM3_ESOFT;
} }