mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-22 06:26:17 +00:00
add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions.
This commit is contained in:
@@ -125,10 +125,10 @@ main (int argc, char *argv[])
|
||||
signal (SIGINT, (void (*)()) intr_hdlr);
|
||||
#endif
|
||||
|
||||
nfc_init ();
|
||||
nfc_init (NULL);
|
||||
|
||||
// Try to open the NFC device
|
||||
pnd = nfc_open (NULL);
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
if (pnd == NULL) {
|
||||
printf ("Unable to open NFC device\n");
|
||||
@@ -219,11 +219,11 @@ main (int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
nfc_close (pnd);
|
||||
nfc_exit ();
|
||||
nfc_exit (NULL);
|
||||
exit (EXIT_SUCCESS);
|
||||
|
||||
error:
|
||||
nfc_close (pnd);
|
||||
nfc_exit ();
|
||||
nfc_exit (NULL);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user