Align with libnfc API change: test nfc_init() result
This commit is contained in:
parent
86c194ef6c
commit
061b41ed2d
17 changed files with 33 additions and 3 deletions
|
@ -168,6 +168,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -117,6 +117,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count= nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -197,6 +197,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -43,6 +43,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -98,6 +98,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -91,6 +91,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -77,6 +77,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -87,6 +87,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -87,6 +87,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -41,6 +41,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -126,6 +126,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -155,6 +155,8 @@ main(int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -38,6 +38,8 @@ main (int argc, char *argv[])
|
|||
|
||||
nfc_context *context;
|
||||
nfc_init (&context);
|
||||
if (context == NULL)
|
||||
errx(EXIT_FAILURE, "Unable to init libnfc (malloc)");
|
||||
|
||||
device_count = nfc_list_devices (context, devices, sizeof (devices) / sizeof (*devices));
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -36,6 +36,7 @@ cut_setup (void)
|
|||
size_t device_count;
|
||||
|
||||
nfc_init (&context);
|
||||
cut_assert_not_null (context, cut_message ("Unable to init libnfc (malloc)"));
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -36,6 +36,7 @@ cut_setup (void)
|
|||
size_t device_count;
|
||||
|
||||
nfc_init (&context);
|
||||
cut_assert_not_null (context, cut_message ("Unable to init libnfc (malloc)"));
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -36,6 +36,7 @@ cut_setup (void)
|
|||
size_t device_count;
|
||||
|
||||
nfc_init (&context);
|
||||
cut_assert_not_null (context, cut_message ("Unable to init libnfc (malloc)"));
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
|
@ -36,6 +36,7 @@ cut_setup (void)
|
|||
size_t device_count;
|
||||
|
||||
nfc_init (&context);
|
||||
cut_assert_not_null (context, cut_message ("Unable to init libnfc (malloc)"));
|
||||
|
||||
device_count = nfc_list_devices (context, devices, 8);
|
||||
if (device_count <= 0)
|
||||
|
|
Loading…
Reference in a new issue