Skip to content

Commit fd88967

Browse files
committed
make style
1 parent 9a0e6fb commit fd88967

File tree

22 files changed

+311
-311
lines changed

22 files changed

+311
-311
lines changed

armsrc/frozen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ static int b64dec(const char *src, int n, char *dst) {
541541
int len = 0;
542542
while (src + 3 < end) {
543543
int a = b64rev(src[0]), b = b64rev(src[1]), c = b64rev(src[2]),
544-
d = b64rev(src[3]);
544+
d = b64rev(src[3]);
545545
dst[len++] = (a << 2) | (b >> 4);
546546
if (src[2] != '=') {
547547
dst[len++] = (b << 4) | (c >> 2);

client/deps/reveng/bmpbit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ main(int argc, char *argv[]) {
7373
setbmp();
7474
if (BMP_BIT != bmpbit || BMP_SUB != bmpsub) {
7575
fprintf(stderr, "reveng: configuration fault. Update "
76-
"reveng/config.h with these definitions and "
77-
"recompile:\n"
78-
"\t#define BMP_BIT %d\n"
79-
"\t#define BMP_SUB %d\n",
76+
"reveng/config.h with these definitions and "
77+
"recompile:\n"
78+
"\t#define BMP_BIT %d\n"
79+
"\t#define BMP_SUB %d\n",
8080
bmpbit, bmpsub);
8181
exit(EXIT_FAILURE);
8282
}
8383
# endif /* BMP_BIT > 0 */
8484
/* check the bitmap constant macro */
8585
if (~(bmp_t) 0 != ~BMP_C(0)) {
8686
fprintf(stderr, "reveng: configuration fault. Edit "
87-
"the definition of BMP_C() in config.h to "
88-
"match BMP_T and recompile.\n");
87+
"the definition of BMP_C() in config.h to "
88+
"match BMP_T and recompile.\n");
8989
exit(EXIT_FAILURE);
9090
}
9191
exit(EXIT_SUCCESS);

client/deps/reveng/preset.c

Lines changed: 229 additions & 229 deletions
Large diffs are not rendered by default.

client/src/cmdhf14a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,7 +2895,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
28952895
int16_t fsci = card.ats[1] & 0x0f;
28962896

28972897
PrintAndLogEx(INFO, " ..." _YELLOW_("%02X") "............ T0 TA1 is%s present, TB1 is%s present, "
2898-
"TC1 is%s present, FSCI is %d (FSC = %d)",
2898+
"TC1 is%s present, FSCI is %d (FSC = %d)",
28992899
card.ats[1],
29002900
(ta1 ? "" : _RED_(" NOT")),
29012901
(tb1 ? "" : _RED_(" NOT")),
@@ -2917,7 +2917,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
29172917
if (strlen(ds) != 0) ds[strlen(ds) - 2] = '\0';
29182918
if (strlen(dr) != 0) dr[strlen(dr) - 2] = '\0';
29192919
PrintAndLogEx(INFO, " ......" _YELLOW_("%02X") "......... TA1 different divisors are%s supported, "
2920-
"DR: [%s], DS: [%s]",
2920+
"DR: [%s], DS: [%s]",
29212921
card.ats[pos],
29222922
((card.ats[pos] & 0x80) ? _RED_(" NOT") : ""),
29232923
dr,

client/src/cmdhf14b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2802,7 +2802,7 @@ static int CmdHF14BCalypsoRead(const char *Cmd) {
28022802
} else {
28032803
PrintAndLogEx(INFO, "%-22s - Sending command failed (%04x - %s).", cmds[i].desc, sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff));
28042804
}
2805-
2805+
28062806
activate_field = false;
28072807
}
28082808

client/src/cmdhffelica.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ static void print_status_flag1_interpretation(void) {
6666
PrintAndLogEx(INFO, "----+--------------------------------------------------------------------------------------------------------------------");
6767
PrintAndLogEx(INFO, " 00 | Indicates the successful completion of a command.");
6868
PrintAndLogEx(INFO, " FF | If an error occurs during the processing of a command that includes no list in the command packet, \n"
69-
" | or if an error occurs independently of any list, the card returns a response by setting FFh to Status Flag1.");
69+
" | or if an error occurs independently of any list, the card returns a response by setting FFh to Status Flag1.");
7070
PrintAndLogEx(INFO, " XX | If an error occurs while processing a command that includes Service Code List or Block List \n"
71-
" | in the command packet, the card returns a response by setting a number in the list to Status Flag1,\n"
72-
" | indicating the location of the error.");
71+
" | in the command packet, the card returns a response by setting a number in the list to Status Flag1,\n"
72+
" | indicating the location of the error.");
7373
PrintAndLogEx(INFO, "----+--------------------------------------------------------------------------------------------------------------------");
7474
}
7575

@@ -78,36 +78,36 @@ static void print_status_flag2_interpration(void) {
7878
PrintAndLogEx(INFO, "----+--------------------------------------------------------------------------------------------------------------------");
7979
PrintAndLogEx(INFO, " 00 | Indicates the successful completion of a command.");
8080
PrintAndLogEx(INFO, " 01 | The calculated result is either less than zero when the purse data is decremented, or exceeds 4\n"
81-
" | Bytes when the purse data is incremented.");
81+
" | Bytes when the purse data is incremented.");
8282
PrintAndLogEx(INFO, " 02 | The specified data exceeds the value of cashback data at cashback of purse.");
8383
PrintAndLogEx(INFO, " 70 | Memory error (fatal error).");
8484
PrintAndLogEx(INFO, " 71 | The number of memory rewrites exceeds the upper limit (this is only a warning; data writing is performed as normal).\n"
85-
" | The maximum number of rewrites can differ, depending on the product being used.\n"
86-
" | In addition, Status Flag1 is either 00h or FFh depending on the product being used.");
85+
" | The maximum number of rewrites can differ, depending on the product being used.\n"
86+
" | In addition, Status Flag1 is either 00h or FFh depending on the product being used.");
8787

8888
PrintAndLogEx(INFO, " A1 | Illegal Number of Service| Number of Service or Number of Node specified by the command \n"
89-
" | falls outside the range of the prescribed value.");
89+
" | falls outside the range of the prescribed value.");
9090
PrintAndLogEx(INFO, " A2 | Illegal command packet (specified Number of Block) : Number of Block specified by the \n"
91-
" | command falls outside the range of the prescribed values for the product.");
91+
" | command falls outside the range of the prescribed values for the product.");
9292
PrintAndLogEx(INFO, " A3 | Illegal Block List (specified order of Service) : Service Code List Order specified by \n"
93-
" | Block List Element falls outside the Number of Service specified by the command \n"
94-
" | (or the Number of Service specified at the times of mutual authentication).");
93+
" | Block List Element falls outside the Number of Service specified by the command \n"
94+
" | (or the Number of Service specified at the times of mutual authentication).");
9595
PrintAndLogEx(INFO, " A4 | Illegal Service type : Area Attribute specified by the command or Service Attribute of Service Code is incorrect.");
9696
PrintAndLogEx(INFO, " A5 | Access is not allowed : Area or Service specified by the command cannot be accessed.\n"
97-
" | The parameter specified by the command does not satisfy the conditions for success.");
97+
" | The parameter specified by the command does not satisfy the conditions for success.");
9898
PrintAndLogEx(INFO, " A6 | Illegal Service Code List : Target to be accessed, identified by Service Code List Order, specified by Block\n"
99-
" | List Element does not exist. Or, Node specified by Node Code List does not exist.");
99+
" | List Element does not exist. Or, Node specified by Node Code List does not exist.");
100100
PrintAndLogEx(INFO, " A7 | Illegal Block List (Access Mode) : Access Mode specified by Block List Element is incorrect.");
101101
PrintAndLogEx(INFO, " A8 | Illegal Block Number Block Number (access to the specified data is inhibited) :\n"
102-
" | specified by Block List Element exceeds the number of Blocks assigned to Service.");
102+
" | specified by Block List Element exceeds the number of Blocks assigned to Service.");
103103
PrintAndLogEx(INFO, " A9 | Data write failure : This is the error that occurs in issuance commands.");
104104
PrintAndLogEx(INFO, " AA | Key-change failure : Key change failed.");
105105
PrintAndLogEx(INFO, " AB | Illegal Package Parity or illegal Package MAC : This is the error that occurs in issuance commands.");
106106
PrintAndLogEx(INFO, " AC | Illegal parameter : This is the error that occurs in issuance commands.");
107107
PrintAndLogEx(INFO, " AD | Service exists already : This is the error that occurs in issuance commands.");
108108
PrintAndLogEx(INFO, " AE | Illegal System Code : This is the error that occurs in issuance commands.");
109109
PrintAndLogEx(INFO, " AF | Too many simultaneous cyclic write operations : Number of simultaneous write Blocks\n"
110-
" | specified by the command to Cyclic Service exceeds the number of Blocks assigned to Service.");
110+
" | specified by the command to Cyclic Service exceeds the number of Blocks assigned to Service.");
111111
PrintAndLogEx(INFO, " C0 | Illegal Package Identifier : This is the error that occurs in issuance commands.");
112112
PrintAndLogEx(INFO, " C1 | Discrepancy of parameters inside and outside Package : This is the error that occurs in issuance commands.");
113113
PrintAndLogEx(INFO, " C2 | Command is disabled already : This is the error that occurs in issuance commands.");
@@ -131,16 +131,16 @@ static void print_number_of_service_constraints(void) {
131131

132132
static void print_number_of_block_constraints(void) {
133133
PrintAndLogEx(INFO, " - Number of Block: shall be less than or equal to the maximum number of Blocks that can be read simultaneously.\n"
134-
" The maximum number of Blocks that can be read simultaneously can differ, depending on the product being used.\n"
135-
" Use as default 01");
134+
" The maximum number of Blocks that can be read simultaneously can differ, depending on the product being used.\n"
135+
" Use as default 01");
136136
}
137137

138138
static void print_service_code_list_constraints(void) {
139139
PrintAndLogEx(INFO, " - Service Code List: For Service Code List, only Service Code existing in the product shall be specified:");
140140
PrintAndLogEx(INFO, " - Even when Service Code exists in the product, Service Code not referenced from Block List shall not \n"
141-
" be specified to Service Code List.");
141+
" be specified to Service Code List.");
142142
PrintAndLogEx(INFO, " - For existence or nonexistence of Service in a product, please check using the Request Service \n"
143-
" (or Request Service v2) command.");
143+
" (or Request Service v2) command.");
144144
}
145145

146146
/*

client/src/cmdhfgallagher.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint
373373
// UID is required for key diversification
374374
if (ctx->uidlen == 0) {
375375
PM3_RET_ERR(PM3_EINVARG, "UID is required for key diversification. "
376-
"Please fetch it before calling `hfgal_create_creds_app`");
376+
"Please fetch it before calling `hfgal_create_creds_app`");
377377
}
378378

379379
// Create application
@@ -862,11 +862,11 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q
862862
PM3_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading card application credentials");
863863

864864
PrintAndLogEx(SUCCESS, "Gallagher (AID %06X) - region: " _GREEN_("%c") " ( " _GREEN_("%u") " )"
865-
", facility: " _GREEN_("%u")
866-
", card number: " _GREEN_("%u")
867-
", issue level: " _GREEN_("%u"),
865+
", facility: " _GREEN_("%u")
866+
", card number: " _GREEN_("%u")
867+
", issue level: " _GREEN_("%u"),
868868
current_aid,
869-
'A' + creds.region_code,
869+
'A' + creds.region_code,
870870
creds.region_code,
871871
creds.facility_code,
872872
creds.card_number,
@@ -1299,10 +1299,10 @@ static int CmdGallagherDecode(const char *cmd) {
12991299
gallagher_decode_creds(data_buf, &creds);
13001300

13011301
PrintAndLogEx(SUCCESS, "Gallagher - region: " _GREEN_("%c") " ( " _GREEN_("%u") " )"
1302-
", facility: " _GREEN_("%u")
1303-
", card number: " _GREEN_("%u")
1304-
", issue level: " _GREEN_("%u"),
1305-
'A' + creds.region_code,
1302+
", facility: " _GREEN_("%u")
1303+
", card number: " _GREEN_("%u")
1304+
", issue level: " _GREEN_("%u"),
1305+
'A' + creds.region_code,
13061306
creds.region_code,
13071307
creds.facility_code,
13081308
creds.card_number,

client/src/cmdhflegic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int decode_and_print_memory(uint16_t card_size, const uint8_t *input_buff
262262
// for printing the complete segment we need at least wrc + wrp_len + remain_seg_payload_len bytes
263263
if ((i + wrc + wrp_len + remain_seg_payload_len) > card_size) {
264264
PrintAndLogEx(FAILED, "Cannot read segment body, because the input buffer is too small. "
265-
"Please check that the data is correct and properly aligned. ");
265+
"Please check that the data is correct and properly aligned. ");
266266
return_value = PM3_EOUTOFBOUND;
267267
goto out;
268268
}
@@ -346,7 +346,7 @@ static int decode_and_print_memory(uint16_t card_size, const uint8_t *input_buff
346346
// for printing the complete segment we need at least wrc + wrp_len + remain_seg_payload_len bytes
347347
if ((i + wrc + wrp_len + remain_seg_payload_len) > card_size) {
348348
PrintAndLogEx(FAILED, "Cannot read segment body, because the input buffer is too small. "
349-
"Please check that the data is correct and properly aligned. ");
349+
"Please check that the data is correct and properly aligned. ");
350350
return_value = PM3_EOUTOFBOUND;
351351
goto out;
352352
}

client/src/cmdhfmfu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2026,7 +2026,7 @@ static int mfu_write_block(const uint8_t *data, uint8_t datalen, uint8_t keytype
20262026
// 1 - 3des key (16 bytes)
20272027
// 2 - pwd (4 bytes)
20282028
// 3 - AES key (16 bytes)
2029-
if ((keytype == 1)||(keytype == 3)) {
2029+
if ((keytype == 1) || (keytype == 3)) {
20302030
memcpy(cmd + datalen, auth_key_ptr, 16);
20312031
cmdlen += 16;
20322032
} else if (keytype == 2) {

client/src/cmdhfntag424.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,8 @@ static int ntag424_authenticate_ev2_first(uint8_t keyno, uint8_t *key, ntag424_s
650650
if (memcmp(response.rnd_a, &rnd_a_clear[1], 15) != 0 ||
651651
response.rnd_a[15] != rnd_a_clear[0]) {
652652
PrintAndLogEx(ERR, "Incorrect response from card\n"
653-
"expected: %s\n"
654-
"got: %s"
653+
"expected: %s\n"
654+
"got: %s"
655655
, sprint_hex(rnd_a_clear, 16),
656656
sprint_hex(response.rnd_a, 16));
657657
return PM3_ESOFT;

0 commit comments

Comments
 (0)