From: Uwe Hermann Date: Tue, 19 Nov 2013 19:09:59 +0000 (+0100) Subject: serial.c: Minor cosmetic fix. X-Git-Tag: libsigrok-0.3.0~550 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1a54044299c0da7bc894bf429fa306b236c10b68;p=libsigrok.git serial.c: Minor cosmetic fix. --- diff --git a/hardware/common/serial.c b/hardware/common/serial.c index d9f08990..de7f583d 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -253,7 +253,8 @@ SR_PRIV int serial_read(struct sr_serial_dev_inst *serial, void *buf, // return SR_ERR; } - sr_spew("Read %d/%d bytes (fd %d).", ret, count, serial->fd); + if (ret >= 0) + sr_spew("Read %d/%d bytes (fd %d).", ret, count, serial->fd); return ret; }