make style

This commit is contained in:
Philippe Teuwen
2020-06-19 18:34:47 +02:00
parent 5787f07617
commit f69739da79
16 changed files with 62 additions and 63 deletions

View File

@@ -1455,7 +1455,7 @@ static int CmdEMVScan(const char *Cmd) {
// current path + file name
if (MergeJSON) {
root = json_load_file( (char*)filename, 0, &error);
root = json_load_file((char *)filename, 0, &error);
if (!root) {
PrintAndLogEx(ERR, "Json error on line %d: %s", error.line, error.text);
return PM3_EFILE;
@@ -1750,15 +1750,15 @@ static int CmdEMVScan(const char *Cmd) {
if (MergeJSON == false) {
// create unique new name
char *fname = newfilenamemcopy((char*)filename, ".json");
char *fname = newfilenamemcopy((char *)filename, ".json");
if (fname == NULL) {
return PM3_EMALLOC;
}
strcpy((char*)filename, fname);
strcpy((char *)filename, fname);
free(fname);
}
res = json_dump_file(root, (char*)filename, JSON_INDENT(2));
res = json_dump_file(root, (char *)filename, JSON_INDENT(2));
if (res) {
PrintAndLogEx(ERR, "Can't save the file: %s", filename);
return PM3_EFILE;

View File

@@ -504,19 +504,19 @@ struct emv_pk *emv_pk_get_ca_pk(const unsigned char *rid, unsigned char idx) {
bool isok = emv_pk_verify(pk);
PrintAndLogEx(INFO, "Verifying CA PK for %02hhx:%02hhx:%02hhx:%02hhx:%02hhx IDX %02hhx %zu bits. ( %s )",
pk->rid[0],
pk->rid[1],
pk->rid[2],
pk->rid[3],
pk->rid[4],
pk->index,
pk->mlen * 8,
(isok) ? _GREEN_("ok") : _RED_("failed")
);
pk->rid[0],
pk->rid[1],
pk->rid[2],
pk->rid[3],
pk->rid[4],
pk->index,
pk->mlen * 8,
(isok) ? _GREEN_("ok") : _RED_("failed")
);
if (isok) {
return pk;
}
}
emv_pk_free(pk);
return NULL;