From: Uwe Hermann Date: Thu, 26 Mar 2020 21:38:41 +0000 (+0100) Subject: examples/send_receive: Fix receive check. X-Git-Tag: libserialport-0.1.2~18 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0a24247de8f66911d062ec0e1ec8dfb7948bbf5a;p=libserialport.git examples/send_receive: Fix receive check. --- diff --git a/examples/send_receive.c b/examples/send_receive.c index 5e9f381..2656489 100644 --- a/examples/send_receive.c +++ b/examples/send_receive.c @@ -86,7 +86,7 @@ int main(int argc, char **argv) /* Try to receive the data on the other port. */ printf("Receiving %d bytes on port %s.\n", size, sp_get_port_name(rx_port)); - check(sp_blocking_read(rx_port, buf, size, timeout)); + result = check(sp_blocking_read(rx_port, buf, size, timeout)); /* Check whether we received the number of bytes we wanted. */ if (result == size)