From 9676d788e0dd208ce446daa651be3ec920b9444e Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 14 Apr 2019 13:37:53 +0200 Subject: [PATCH] style --- armsrc/fpgaloader.c | 2 +- armsrc/mifaresim.c | 2 +- client/cmdlfindala.c | 8 ++++---- client/cmdlft55xx.c | 4 ++-- client/proxmark3.c | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/armsrc/fpgaloader.c b/armsrc/fpgaloader.c index 2474d7026..1be2c6138 100644 --- a/armsrc/fpgaloader.c +++ b/armsrc/fpgaloader.c @@ -468,7 +468,7 @@ void SetAdcMuxFor(uint32_t whichGpio) { LOW(GPIO_MUXSEL_LOPKD); LOW(GPIO_MUXSEL_HIRAW); LOW(GPIO_MUXSEL_LORAW); - + #else // FPC serial uses HIRAW/LOWRAW pins, so they are excluded here. AT91C_BASE_PIOA->PIO_OER = GPIO_MUXSEL_HIPKD | GPIO_MUXSEL_LOPKD; diff --git a/armsrc/mifaresim.c b/armsrc/mifaresim.c index 3b7e91687..15aa93117 100644 --- a/armsrc/mifaresim.c +++ b/armsrc/mifaresim.c @@ -445,7 +445,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t uint8_t rAUTH_NT_keystream[4]; uint32_t nonce = 0; - tUart *uart = GetUart(); + tUart *uart = GetUart(); if ((flags & FLAG_MF_MINI) == FLAG_MF_MINI) { MifareCardType = 0; diff --git a/client/cmdlfindala.c b/client/cmdlfindala.c index be850d43f..144a76312 100644 --- a/client/cmdlfindala.c +++ b/client/cmdlfindala.c @@ -26,13 +26,13 @@ static int usage_lf_indala_demod(void) { PrintAndLogEx(NORMAL, " h : This help"); PrintAndLogEx(NORMAL, " clock : Set clock (as integer) optional, if not set, autodetect."); PrintAndLogEx(NORMAL, " invert : 1 for invert output"); - PrintAndLogEx(NORMAL, " maxerror : Set maximum allowed errors, default = 100."); + PrintAndLogEx(NORMAL, " maxerror : Set maximum allowed errors, default = 100."); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); PrintAndLogEx(NORMAL, " lf indala demod"); PrintAndLogEx(NORMAL, " lf indala demod 32 = demod a Indala tag from GraphBuffer using a clock of RF/32"); - PrintAndLogEx(NORMAL, " lf indala demod 32 1 = demod a Indala tag from GraphBuffer using a clock of RF/32 and inverting data"); - PrintAndLogEx(NORMAL, " lf indala demod 64 1 0 = demod a Indala tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors"); + PrintAndLogEx(NORMAL, " lf indala demod 32 1 = demod a Indala tag from GraphBuffer using a clock of RF/32 and inverting data"); + PrintAndLogEx(NORMAL, " lf indala demod 64 1 0 = demod a Indala tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors"); return 0; } @@ -57,7 +57,7 @@ static int CmdIndalaDemod(const char *Cmd) { char cmdp = tolower(param_getchar(Cmd, 0)); if (cmdp == 'h') return usage_lf_indala_demod(); - + int ans; if (strlen(Cmd) > 0) ans = PSKDemod(Cmd, true); diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index cbfd71dad..b578a42ea 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -1211,8 +1211,8 @@ static int CmdT55xxReadTrace(const char *Cmd) { ct = localtime_s(&tm_buf, &now) == 0 ? &tm_buf : NULL; #else ct = localtime_r(&now, &tm_buf); -#endif - +#endif + if (data.year > ct->tm_year - 110) data.year += 2000; else diff --git a/client/proxmark3.c b/client/proxmark3.c index cf52ba649..c4000bd84 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -292,14 +292,14 @@ int main(int argc, char *argv[]) { char *exec_name = argv[0]; #if defined(_WIN32) for (int m = strlen(exec_name); m > 0; m--) { - if ( exec_name[m] == '\\' ) { + if (exec_name[m] == '\\') { exec_name += (++m); break; } } #endif - for (int i=1; i < argc; i++) { + for (int i = 1; i < argc; i++) { if (argv[i][0] != '-') { // For backward compatibility we accept direct port @@ -323,7 +323,7 @@ int main(int argc, char *argv[]) { } if (port != NULL) { // We got already one - PrintAndLogEx(ERR, _RED_("ERROR:") "cannot parse command line. We got %s as port and now we got also: %s\n", port, argv[i+1]); + PrintAndLogEx(ERR, _RED_("ERROR:") "cannot parse command line. We got %s as port and now we got also: %s\n", port, argv[i + 1]); show_help(false, exec_name); return 1; }