nfc_list_devices() function returns now the number of devices found.
This commit is contained in:
parent
00818e048c
commit
1ec504e163
12 changed files with 23 additions and 34 deletions
|
|
@ -114,9 +114,8 @@ main (int argc, const char *argv[])
|
|||
strcpy(ndd.acDevice, "SCM Micro / SCL3711-NFC&RW");
|
||||
pnd = nfc_connect (&ndd);
|
||||
#endif
|
||||
size_t szDeviceFound;
|
||||
nfc_connstring connstrings[MAX_DEVICE_COUNT];
|
||||
nfc_list_devices (connstrings, MAX_DEVICE_COUNT, &szDeviceFound);
|
||||
size_t szDeviceFound = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
|
||||
|
||||
if (szDeviceFound == 0) {
|
||||
printf ("No NFC device found.\n");
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@ int
|
|||
main (int argc, char *argv[])
|
||||
{
|
||||
int arg;
|
||||
size_t szFound;
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
nfc_target ntRealTarget;
|
||||
|
||||
|
|
@ -193,7 +192,7 @@ main (int argc, char *argv[])
|
|||
|
||||
nfc_connstring connstrings[MAX_DEVICE_COUNT];
|
||||
// List available devices
|
||||
nfc_list_devices (connstrings, MAX_DEVICE_COUNT, &szFound);
|
||||
size_t szFound = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
|
||||
|
||||
if (initiator_only_mode || target_only_mode) {
|
||||
if (szFound < 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue