From: Martin Ling Date: Sun, 21 Sep 2014 18:11:23 +0000 (+0100) Subject: norma-dmm: Mark serial read call as nonblocking. X-Git-Tag: libsigrok-0.4.0~948 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=32950cc071715efae178aac92e7975c8ed185fd1;p=libsigrok.git norma-dmm: 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/norma-dmm/protocol.c b/src/hardware/norma-dmm/protocol.c index 717ef152..522d88a1 100644 --- a/src/hardware/norma-dmm/protocol.c +++ b/src/hardware/norma-dmm/protocol.c @@ -391,7 +391,7 @@ SR_PRIV int norma_dmm_receive_data(int fd, int revents, void *cb_data) if (revents == G_IO_IN) { /* Serial data arrived. */ while (NMADMM_BUFSIZE - devc->buflen - 1 > 0) { - len = serial_read(serial, devc->buf + devc->buflen, 1); + len = serial_read_nonblocking(serial, devc->buf + devc->buflen, 1); if (len < 1) break; devc->buflen += len;