From a7448f802f62e6490c5e8df0566c179e2e0de3e1 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 7 Apr 2019 12:10:51 +0200 Subject: [PATCH] make style: don't indent preprocessor directives --- Makefile | 2 +- armsrc/Standalone/hf_colin.c | 40 ++++++++++++++++++------------------ client/cmdlfindala.c | 18 ++++++++-------- common/crc.h | 18 ++++++++-------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index 77c205e68..512c9e2db 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ style: -exec sh -c "echo >> {}" \; # Apply astyle on *.c, *.h, *.cpp find . \( -name "*.[ch]" -or -name "*.cpp" \) -exec astyle --formatted --mode=c --suffix=none \ - --indent=spaces=4 --indent-switches --indent-preprocessor \ + --indent=spaces=4 --indent-switches \ --keep-one-line-blocks --max-instatement-indent=60 \ --style=google --pad-oper --unpad-paren --pad-header \ --align-pointer=name {} \; diff --git a/armsrc/Standalone/hf_colin.c b/armsrc/Standalone/hf_colin.c index 87f89883c..d477fe560 100644 --- a/armsrc/Standalone/hf_colin.c +++ b/armsrc/Standalone/hf_colin.c @@ -614,13 +614,13 @@ failtag: for (uint16_t s = 0; s < sectorsCnt; s++) { num_to_bytes(key64, 6, foundKey[i][s]); sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x", - foundKey[i][s][0], - foundKey[i][s][1], - foundKey[i][s][2], - foundKey[i][s][3], - foundKey[i][s][4], - foundKey[i][s][5] - ); + foundKey[i][s][0], + foundKey[i][s][1], + foundKey[i][s][2], + foundKey[i][s][3], + foundKey[i][s][4], + foundKey[i][s][5] + ); cjSetCursRight(); DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, i); } @@ -653,26 +653,26 @@ failtag: for (uint16_t s = 0; s < sectorsCnt; s++) { num_to_bytes(0x414c41524f4e, 6, foundKey[t][s]); sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x", - foundKey[t][s][0], - foundKey[t][s][1], - foundKey[t][s][2], - foundKey[t][s][3], - foundKey[t][s][4], - foundKey[t][s][5]); + foundKey[t][s][0], + foundKey[t][s][1], + foundKey[t][s][2], + foundKey[t][s][3], + foundKey[t][s][4], + foundKey[t][s][5]); cjSetCursRight(); DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, t); } - + t = 1; for (uint16_t s = 0; s < sectorsCnt; s++) { num_to_bytes(0x424c41524f4e, 6, foundKey[t][s]); sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x", - foundKey[t][s][0], - foundKey[t][s][1], - foundKey[t][s][2], - foundKey[t][s][3], - foundKey[t][s][4], - foundKey[t][s][5]); + foundKey[t][s][0], + foundKey[t][s][1], + foundKey[t][s][2], + foundKey[t][s][3], + foundKey[t][s][4], + foundKey[t][s][5]); cjSetCursRight(); DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, t); } diff --git a/client/cmdlfindala.c b/client/cmdlfindala.c index 985ae81d2..b136d9434 100644 --- a/client/cmdlfindala.c +++ b/client/cmdlfindala.c @@ -268,15 +268,15 @@ int CmdIndalaDemod(const char *Cmd) { PrintAndLogEx( SUCCESS , "Indala Found - bitlength %d, Raw 0x%x%08x%08x%08x%08x%08x%08x" - , DemodBufferLen - , uid1 - , uid2 - , uid3 - , uid4 - , uid5 - , uid6 - , uid7 - ); + , DemodBufferLen + , uid1 + , uid2 + , uid3 + , uid4 + , uid5 + , uid6 + , uid7 + ); } if (g_debugMode) { diff --git a/common/crc.h b/common/crc.h index 7ad2fdc69..7cb9caff9 100644 --- a/common/crc.h +++ b/common/crc.h @@ -64,14 +64,14 @@ uint32_t CRC8Legic(uint8_t *buff, size_t size); /* Static initialization of a crc structure */ #define CRC_INITIALIZER(_order, _polynom, _initial_value, _final_xor) { \ - .state = ((_initial_value) & ((1L<<(_order))-1)), \ - .order = (_order), \ - .polynom = (_polynom), \ - .initial_value = (_initial_value), \ - .final_xor = (_final_xor), \ - .mask = ((1L<<(_order))-1) \ - .refin = false, \ - .refout = false \ - } + .state = ((_initial_value) & ((1L<<(_order))-1)), \ + .order = (_order), \ + .polynom = (_polynom), \ + .initial_value = (_initial_value), \ + .final_xor = (_final_xor), \ + .mask = ((1L<<(_order))-1) \ + .refin = false, \ + .refout = false \ +} #endif /* __CRC_H */