From 3b8598dde82a294bdd2b5b646de728e6581e5984 Mon Sep 17 00:00:00 2001 From: Audrey Diacre Date: Fri, 6 Jan 2012 08:36:24 +0000 Subject: [PATCH] libnfc/test: fix some forgotten modifications due to the last revision. --- test/test_dep_active.c | 2 +- test/test_dep_passive.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_dep_active.c b/test/test_dep_active.c index e77fce8..7fe577a 100644 --- a/test/test_dep_active.c +++ b/test/test_dep_active.c @@ -88,7 +88,7 @@ target_thread (void *arg) cut_assert_operator_int (res, >, 0, cut_message ("Can't initialize NFC device as target: %s", nfc_strerror (device))); if (res < 0) { thread_res = -1; return (void*) thread_res; } - res = nfc_target_receive_bytes (device, abtRx, 500); + res = nfc_target_receive_bytes (device, abtRx, sizeof (abtRx), 500); cut_assert_operator_int (res, >, 0, cut_message ("Can't receive bytes from initiator: %s", nfc_strerror (device))); szRx = (size_t) res; const uint8_t abtAttRx[] = "Hello DEP target!"; diff --git a/test/test_dep_passive.c b/test/test_dep_passive.c index 0b709da..c7d9932 100644 --- a/test/test_dep_passive.c +++ b/test/test_dep_passive.c @@ -87,7 +87,7 @@ target_thread (void *arg) if (res < 0) { thread_res = -1; return (void*) thread_res; } // First pass - res = nfc_target_receive_bytes (device, abtRx, 500); + res = nfc_target_receive_bytes (device, abtRx, sizeof (abtRx), 500); cut_assert_operator_int (res, >, 0, cut_message ("Can't receive bytes from initiator: %s", nfc_strerror (device))); szRx = (size_t) res; @@ -101,7 +101,7 @@ target_thread (void *arg) if (res <= 0) { thread_res = -1; return (void*) thread_res; } // Second pass - res = nfc_target_receive_bytes (device, abtRx, 500); + res = nfc_target_receive_bytes (device, abtRx, sizeof (abtRx), 500); cut_assert_operator_int (res, >, 0, cut_message ("Can't receive bytes from initiator: %s", nfc_strerror (device))); szRx = (size_t) res; @@ -113,7 +113,7 @@ target_thread (void *arg) if (res <= 0) { thread_res = -1; return (void*) thread_res; } // Third pass - res = nfc_target_receive_bytes (device, abtRx, 500); + res = nfc_target_receive_bytes (device, abtRx, sizeof (abtRx), 500); cut_assert_operator_int (res, >, 0, cut_message ("Can't receive bytes from initiator: %s", nfc_strerror (device))); szRx = (size_t) res; @@ -125,7 +125,7 @@ target_thread (void *arg) if (res <= 0) { thread_res = -1; return (void*) thread_res; } // Fourth pass - res = nfc_target_receive_bytes (device, abtRx, 500); + res = nfc_target_receive_bytes (device, abtRx, sizeof (abtRx), 500); cut_assert_operator_int (res, >, 0, cut_message ("Can't receive bytes from initiator: %s", nfc_strerror (device))); szRx = (size_t) res;