diff --git a/libnfc/buses/uart_posix.c b/libnfc/buses/uart_posix.c index 7b687c1..ced1bc6 100644 --- a/libnfc/buses/uart_posix.c +++ b/libnfc/buses/uart_posix.c @@ -127,7 +127,7 @@ uart_flush_input(serial_port sp) } char *rx = malloc(available_bytes_count); // There is something available, read the data - res = read(UART_DATA(sp)->fd, rx, available_bytes_count); + read(UART_DATA(sp)->fd, rx, available_bytes_count); log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%d bytes have eatten.", available_bytes_count); free(rx); } diff --git a/test/test_dep_passive.c b/test/test_dep_passive.c index 6f093e9..71d7e3a 100644 --- a/test/test_dep_passive.c +++ b/test/test_dep_passive.c @@ -105,7 +105,6 @@ target_thread(void *arg) // Second pass 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; cut_assert_equal_memory(abtAttRx, sizeof(abtAttRx), abtRx, res, cut_message("Invalid received data")); if (res <= 0) { thread_res = -1; return (void *) thread_res; } @@ -117,7 +116,6 @@ target_thread(void *arg) // Third pass 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; cut_assert_equal_memory(abtAttRx, sizeof(abtAttRx), abtRx, res, cut_message("Invalid received data")); if (res <= 0) { thread_res = -1; return (void *) thread_res; } @@ -129,7 +127,6 @@ target_thread(void *arg) // Fourth pass 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; cut_assert_equal_memory(abtAttRx, sizeof(abtAttRx), abtRx, res, cut_message("Invalid received data")); if (res <= 0) { thread_res = -1; return (void *) thread_res; }