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