From: Martin Ling Date: Sun, 21 Sep 2014 17:59:45 +0000 (+0100) Subject: motech-lps-30x: Mark serial read call as nonblocking. X-Git-Tag: libsigrok-0.4.0~951 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e050124095c3e0109ead1fc162504cc513a4e08c;p=libsigrok.git motech-lps-30x: Mark serial read call as nonblocking. This call was already nonblocking since the driver opens the port with the SERIAL_NONBLOCK flag. It only reads one byte, and a zero result is handled appropriately. --- diff --git a/src/hardware/motech-lps-30x/protocol.c b/src/hardware/motech-lps-30x/protocol.c index c4afd657..78d822f0 100644 --- a/src/hardware/motech-lps-30x/protocol.c +++ b/src/hardware/motech-lps-30x/protocol.c @@ -152,7 +152,7 @@ SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data) if (revents == G_IO_IN) { /* Serial data arrived. */ while (LINELEN_MAX - devc->buflen - 2 > 0) { - len = serial_read(serial, devc->buf + devc->buflen, 1); + len = serial_read_nonblocking(serial, devc->buf + devc->buflen, 1); if (len < 1) break;