From 6984e162e6919a0c43166e41ebd0c92b6316313e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Tue, 12 May 2015 12:25:44 +0200 Subject: [PATCH] Fix " \t" sequences. --- examples/mifare-classic-write-ndef.c | 10 +++++----- libfreefare/freefare.h | 2 +- libfreefare/mifare_classic.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/mifare-classic-write-ndef.c b/examples/mifare-classic-write-ndef.c index 79e7928..76bc308 100644 --- a/examples/mifare-classic-write-ndef.c +++ b/examples/mifare-classic-write-ndef.c @@ -243,13 +243,13 @@ main(int argc, char *argv[]) bool write_ndef = true; if (write_options.interactive) { - printf ("Write NDEF [yN] "); - fgets (buffer, BUFSIZ, stdin); - write_ndef = ((buffer[0] == 'y') || (buffer[0] == 'Y')); + printf ("Write NDEF [yN] "); + fgets (buffer, BUFSIZ, stdin); + write_ndef = ((buffer[0] == 'y') || (buffer[0] == 'Y')); } else { - printf ("\n"); + printf ("\n"); } - + for (int n = 0; n < 40; n++) { memcpy(card_write_keys[n].key, transport_key, sizeof (transport_key)); card_write_keys[n].type = MFC_KEY_A; diff --git a/libfreefare/freefare.h b/libfreefare/freefare.h index 527d746..42569fc 100644 --- a/libfreefare/freefare.h +++ b/libfreefare/freefare.h @@ -100,7 +100,7 @@ int mifare_classic_decrement (FreefareTag tag, const MifareClassicBlockNumber int mifare_classic_restore (FreefareTag tag, const MifareClassicBlockNumber block); int mifare_classic_transfer (FreefareTag tag, const MifareClassicBlockNumber block); -int mifare_classic_get_trailer_block_permission (FreefareTag tag, const MifareClassicBlockNumber block, const uint16_t permission, const MifareClassicKeyType key_type); +int mifare_classic_get_trailer_block_permission (FreefareTag tag, const MifareClassicBlockNumber block, const uint16_t permission, const MifareClassicKeyType key_type); int mifare_classic_get_data_block_permission (FreefareTag tag, const MifareClassicBlockNumber block, const unsigned char permission, const MifareClassicKeyType key_type); int mifare_classic_format_sector (FreefareTag tag, const MifareClassicSectorNumber sector); diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index ab7a14b..71e7a32 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -142,7 +142,7 @@ unsigned char mifare_data_access_permissions[] = { * ||,--- C1 |||| |||,--------------------- i * ||| |||| |||| * 0b000 0b 1111 1111 */ 0xff, /* Default (blank card) */ - /* 0b001 0b 1000 1100 */ 0x8c, + /* 0b001 0b 1000 1100 */ 0x8c, /* 0b010 0b 1000 1000 */ 0x88, /* 0b011 0b 1010 1111 */ 0xaf, /* 0b100 0b 1010 1010 */ 0xaa, @@ -171,7 +171,7 @@ uint16_t mifare_trailer_access_permissions[] = { * ||,--- C1 |||| |||| |||,-------------------------------- write B * ||| |||| |||| |||| * 0b000 0b 0010 1000 1010*/ 0x28a, - /* 0b001 0b 0001 1100 0001*/ 0x1c1, + /* 0b001 0b 0001 1100 0001*/ 0x1c1, /* 0b010 0b 0000 1000 1000*/ 0x088, /* 0b011 0b 0000 1100 0000*/ 0x0c0, /* 0b100 0b 0010 1010 1010*/ 0x2aa, /* Default (blank card) */