]> sigrok.org Git - libsigrok.git/commitdiff
serial.c: Minor cosmetic fix.
authorUwe Hermann <redacted>
Tue, 19 Nov 2013 19:09:59 +0000 (20:09 +0100)
committerUwe Hermann <redacted>
Tue, 19 Nov 2013 19:09:59 +0000 (20:09 +0100)
hardware/common/serial.c

index d9f089900b9649523d1cace4576f7ae4b2aa2f73..de7f583dad022022cc521ea95a9342b7c1616bb4 100644 (file)
@@ -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;
 }