From 7547952a4d8f256cb66171c555f03b42c77858fc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 11 Apr 2019 07:40:50 +0200 Subject: [PATCH] style --- client/cmdlfhid.c | 6 +++--- client/cmdtrace.c | 2 +- client/emv/apduinfo.c | 2 +- client/util.c | 7 +++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/client/cmdlfhid.c b/client/cmdlfhid.c index 91bd785b3..c07fc2c1f 100644 --- a/client/cmdlfhid.c +++ b/client/cmdlfhid.c @@ -200,7 +200,7 @@ int CmdHIDDemod(const char *Cmd) { cardnum = (lo >> 1) & 0xFFFFF; fc = ((hi & 1) << 11) | (lo >> 21); } - if(fmtLen==36){ + if (fmtLen == 36) { oem = (lo >> 1) & 0x3; cardnum = (lo >> 3) & 0xFFFF; fc = (hi & 0x7) << 13 | ((lo >> 19) & 0xFFFF); @@ -218,7 +218,7 @@ int CmdHIDDemod(const char *Cmd) { PrintAndLogEx(SUCCESS, "HID Prox TAG (Kastle format) ID: %08x (%u) - Format Len: 32bit - CC: %u - FC: %u - Card: %u", lo, (lo >> 1) & 0xFFFF, cc, fc, cardnum); } else { PrintAndLogEx(SUCCESS, "HID Prox TAG ID: %x%08x (%u) - Format Len: %ubit - OEM: %03u - FC: %u - Card: %u", - hi, lo, cardnum, fmtLen, oem, fc, cardnum); + hi, lo, cardnum, fmtLen, oem, fc, cardnum); } } @@ -405,7 +405,7 @@ static void calc34(uint16_t fc, uint32_t cardno, uint8_t *out) { // *lo = ((cardno & 0xFFFFF) << 1) | fc << 21; // *hi = (1 << 5) | ((fc >> 11) & 1); // } -static void calc36(uint8_t oem, uint16_t fc, uint32_t cardno, uint8_t *out){ +static void calc36(uint8_t oem, uint16_t fc, uint32_t cardno, uint8_t *out) { // FC 1 - 16 - 16 bit // cardno 17 - 33 - 16 bit // oem 34 - 35 - 2 bit diff --git a/client/cmdtrace.c b/client/cmdtrace.c index 5829c4e2f..df12ac420 100644 --- a/client/cmdtrace.c +++ b/client/cmdtrace.c @@ -68,7 +68,7 @@ static bool next_record_is_response(uint16_t tracepos, uint8_t *trace) { } static bool merge_topaz_reader_frames(uint32_t timestamp, uint32_t *duration, uint16_t *tracepos, uint16_t traceLen, - uint8_t *trace, uint8_t *frame, uint8_t *topaz_reader_command, uint16_t *data_len) { + uint8_t *trace, uint8_t *frame, uint8_t *topaz_reader_command, uint16_t *data_len) { #define MAX_TOPAZ_READER_CMD_LEN 16 diff --git a/client/emv/apduinfo.c b/client/emv/apduinfo.c index 8d0d3bf89..c497eb4f8 100644 --- a/client/emv/apduinfo.c +++ b/client/emv/apduinfo.c @@ -277,7 +277,7 @@ int CodeCmp(const char *code1, const char *code2) { return -1; } -const APDUCode * GetAPDUCode(uint8_t sw1, uint8_t sw2) { +const APDUCode *GetAPDUCode(uint8_t sw1, uint8_t sw2) { char buf[6] = {0}; int res; int mineq = APDUCodeTableLen; diff --git a/client/util.c b/client/util.c index edcd93bb2..7febdac9f 100644 --- a/client/util.c +++ b/client/util.c @@ -752,12 +752,11 @@ void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length) { } // add HID parity to binary array: ODD prefix for 1st half of ID, EVEN suffix for 2nd half -void wiegand_add_parity_swapped(uint8_t *target, uint8_t *source, uint8_t length) -{ - *(target++)= GetParity(source, ODD, length / 2); +void wiegand_add_parity_swapped(uint8_t *target, uint8_t *source, uint8_t length) { + *(target++) = GetParity(source, ODD, length / 2); memcpy(target, source, length); target += length; - *(target)= GetParity(source + length / 2, EVEN, length / 2); + *(target) = GetParity(source + length / 2, EVEN, length / 2); } // xor two arrays together for len items. The dst array contains the new xored values.