From: Martin Ling Date: Sun, 21 Sep 2014 17:33:34 +0000 (+0100) Subject: gmc-mh-1x-2x: Mark serial read call as nonblocking. X-Git-Tag: libsigrok-0.4.0~959 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=0714a010ccd12514861eb24411fdb156299658a9;hp=bb27c76513c887ad28bbafafb34858ee2e548c6d;p=libsigrok.git gmc-mh-1x-2x: 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/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index 4574dfea..1a969d11 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -90,7 +90,7 @@ static int read_byte(struct sr_serial_dev_inst *serial, gint64 timeout) int rc = 0; for (;;) { - rc = serial_read(serial, &result, 1); + rc = serial_read_nonblocking(serial, &result, 1); if (rc == 1) { sr_spew("read: 0x%02x/%d", result, result); return result;