Align with libnfc API change: test nfc_init() result

This commit is contained in:
Philippe Teuwen 2013-03-30 18:07:34 +01:00
parent 86c194ef6c
commit 061b41ed2d
17 changed files with 33 additions and 3 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)