mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-21 22:16:16 +00:00
add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions.
This commit is contained in:
@@ -77,14 +77,14 @@ main (int argc, const char *argv[])
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
nfc_init ();
|
||||
nfc_init (NULL);
|
||||
|
||||
// Display libnfc version
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
// Open using the first available NFC device
|
||||
pnd = nfc_open (NULL);
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
if (pnd == NULL) {
|
||||
ERR ("%s", "Unable to open NFC device.");
|
||||
@@ -193,7 +193,7 @@ main (int argc, const char *argv[])
|
||||
|
||||
// Close NFC device
|
||||
nfc_close (pnd);
|
||||
nfc_exit ();
|
||||
nfc_exit (NULL);
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user