mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-23 06:56:20 +00:00
Examples and utils are now updated to use the requiered nfc_context
This commit is contained in:
@@ -83,10 +83,11 @@ int main(int argc, const char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
nfc_init(NULL);
|
||||
nfc_context *context;
|
||||
nfc_init(&context);
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open(NULL, NULL);
|
||||
pnd = nfc_open(context, NULL);
|
||||
|
||||
if (pnd == NULL) {
|
||||
ERR("%s", "Unable to open NFC device.");
|
||||
@@ -197,6 +198,6 @@ int main(int argc, const char *argv[])
|
||||
fclose(input);
|
||||
}
|
||||
nfc_close(pnd);
|
||||
nfc_exit(NULL);
|
||||
return 1;
|
||||
nfc_exit(context);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user