From d7bffac0e67c50323415737db5cbb59beda3b20d Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 12 Oct 2010 14:02:53 +0000 Subject: [PATCH] Fix const bytes notation, string notation will add EOL ('\0') --- examples/nfc-relay.c | 7 +++---- examples/pn53x-sam.c | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/nfc-relay.c b/examples/nfc-relay.c index 5604659..3888e0f 100644 --- a/examples/nfc-relay.c +++ b/examples/nfc-relay.c @@ -126,11 +126,10 @@ main (int argc, char *argv[]) printf ("[+] To do this, please send any command after the anti-collision\n"); printf ("[+] For example, send a RATS command or use the \"nfc-anticol\" tool\n"); - // Note: We have to build a "fake" nfc_target_t in order to do exactly the same that was done before the new nfc_target_init() was introduced. nfc_target_t nt = { - .ntt = NTT_GENERIC_PASSIVE_106, - .nti.nai.abtAtqa = "\x04\x00", - .nti.nai.abtUid = "\xde\xad\xbe\xef", + .ntt = NTT_MIFARE, + .nti.nai.abtAtqa = { 0x04, 0x00 }, + .nti.nai.abtUid = { 0xde, 0xad, 0xbe, 0xef }, .nti.nai.btSak = 0x20, .nti.nai.szUidLen = 4, .nti.nai.szAtsLen = 0, diff --git a/examples/pn53x-sam.c b/examples/pn53x-sam.c index 1b6b529c..b754a1f 100644 --- a/examples/pn53x-sam.c +++ b/examples/pn53x-sam.c @@ -198,9 +198,9 @@ main (int argc, const char *argv[]) size_t szRxLen; nfc_target_t nt = { - .ntt = NTT_GENERIC_PASSIVE_106, - .nti.nai.abtAtqa = "\x04\x00", - .nti.nai.abtUid = "\x08\xad\xbe\xaf", + .ntt = NTT_MIFARE, + .nti.nai.abtAtqa = { 0x04, 0x00 }, + .nti.nai.abtUid = { 0x08, 0xad, 0xbe, 0xaf }, .nti.nai.btSak = 0x20, .nti.nai.szUidLen = 4, .nti.nai.szAtsLen = 0,