]> sigrok.org Git - libserialport.git/commitdiff
examples/send_receive: Fix receive check.
authorUwe Hermann <redacted>
Thu, 26 Mar 2020 21:38:41 +0000 (22:38 +0100)
committerUwe Hermann <redacted>
Thu, 26 Mar 2020 21:38:41 +0000 (22:38 +0100)
examples/send_receive.c

index 5e9f38121546780b2f4da77d3fb8e7b6a2110c35..265648916d367b261f5332eb7520b19cec6f50d6 100644 (file)
@@ -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)