mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-14 03:23:48 +00:00
Examples and utils are now updated to use the requiered nfc_context
This commit is contained in:
@@ -71,9 +71,10 @@ main(int argc, const char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
nfc_init(NULL);
|
||||
nfc_context *context;
|
||||
nfc_init(&context);
|
||||
|
||||
pnd = nfc_open(NULL, NULL);
|
||||
pnd = nfc_open(context, NULL);
|
||||
if (!pnd) {
|
||||
printf("Unable to open NFC device.\n");
|
||||
return EXIT_FAILURE;
|
||||
@@ -110,6 +111,6 @@ main(int argc, const char *argv[])
|
||||
|
||||
error:
|
||||
nfc_close(pnd);
|
||||
nfc_exit(NULL);
|
||||
nfc_exit(context);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user