make style

This commit is contained in:
Romuald Conty 2013-02-20 19:01:41 +01:00
parent 0c2d2b5894
commit ba7e75cd16

View file

@ -280,7 +280,7 @@ int main(int argc, char *const argv[])
int res; int res;
if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, block, &mp)) < 0) { if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, block, &mp)) < 0) {
if (res != NFC_EMFCAUTHFAIL) { if (res != NFC_EMFCAUTHFAIL) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_anticollision(t, r); mf_anticollision(t, r);
@ -295,7 +295,7 @@ int main(int argc, char *const argv[])
int res; int res;
if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, block, &mp)) < 0) { if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, block, &mp)) < 0) {
if (res != NFC_EMFCAUTHFAIL) { if (res != NFC_EMFCAUTHFAIL) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_anticollision(t, r); mf_anticollision(t, r);
@ -350,7 +350,7 @@ int main(int argc, char *const argv[])
int res; int res;
if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, t.sectors[j].trailer, &mp)) < 0) { if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, t.sectors[j].trailer, &mp)) < 0) {
if (res != NFC_EMFCAUTHFAIL) { if (res != NFC_EMFCAUTHFAIL) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_anticollision(t, r); mf_anticollision(t, r);
@ -408,9 +408,9 @@ int main(int argc, char *const argv[])
int res; int res;
if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, t.sectors[j].trailer, &mp)) < 0) { if ((res = nfc_initiator_mifare_cmd(r.pdi, mc, t.sectors[j].trailer, &mp)) < 0) {
if (res != NFC_EMFCAUTHFAIL) { if (res != NFC_EMFCAUTHFAIL) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_anticollision(t, r); mf_anticollision(t, r);
} else { } else {
// Save all information about successfull authentization // Save all information about successfull authentization
@ -470,7 +470,7 @@ int main(int argc, char *const argv[])
int res; int res;
if ((res = nfc_initiator_mifare_cmd(r.pdi, MC_AUTH_A, block, &mp)) < 0) { if ((res = nfc_initiator_mifare_cmd(r.pdi, MC_AUTH_A, block, &mp)) < 0) {
if (res != NFC_EMFCAUTHFAIL) { if (res != NFC_EMFCAUTHFAIL) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_configure(r.pdi); mf_configure(r.pdi);
@ -485,7 +485,7 @@ int main(int argc, char *const argv[])
} else { } else {
// Error, now try read() with B key // Error, now try read() with B key
if (res != NFC_ERFTRANS) { if (res != NFC_ERFTRANS) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_configure(r.pdi); mf_configure(r.pdi);
@ -493,7 +493,7 @@ int main(int argc, char *const argv[])
memcpy(mp.mpa.abtKey, t.sectors[i].KeyB, sizeof(t.sectors[i].KeyB)); memcpy(mp.mpa.abtKey, t.sectors[i].KeyB, sizeof(t.sectors[i].KeyB));
if ((res = nfc_initiator_mifare_cmd(r.pdi, MC_AUTH_B, block, &mp)) < 0) { if ((res = nfc_initiator_mifare_cmd(r.pdi, MC_AUTH_B, block, &mp)) < 0) {
if (res != NFC_EMFCAUTHFAIL) { if (res != NFC_EMFCAUTHFAIL) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_configure(r.pdi); mf_configure(r.pdi);
@ -507,7 +507,7 @@ int main(int argc, char *const argv[])
failure = false; failure = false;
} else { } else {
if (res != NFC_ERFTRANS) { if (res != NFC_ERFTRANS) {
nfc_perror (r.pdi, "nfc_initiator_mifare_cmd"); nfc_perror(r.pdi, "nfc_initiator_mifare_cmd");
goto error; goto error;
} }
mf_configure(r.pdi); mf_configure(r.pdi);