X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ftondaj-sl-814%2Fprotocol.c;h=589161652ed79ca6eb9446216c95665a589eca88;hb=4439363aa02928098eab8dcd18b5ccb41737c882;hp=cf8851918b4edf20a29ffcb3889ba7d0c8fa4cf9;hpb=d043b29d5c99c7b72044d19c758c47de4138f0e8;p=libsigrok.git diff --git a/src/hardware/tondaj-sl-814/protocol.c b/src/hardware/tondaj-sl-814/protocol.c index cf885191..58916165 100644 --- a/src/hardware/tondaj-sl-814/protocol.c +++ b/src/hardware/tondaj-sl-814/protocol.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #include @@ -175,7 +174,7 @@ SR_PRIV int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data) } else if (devc->state == GET_PACKET) { /* Read a packet from the device. */ ret = serial_read_nonblocking(serial, devc->buf + devc->buflen, - 4 - devc->buflen); + 4 - devc->buflen); if (ret < 0) { sr_err("Error reading packet: %d.", ret); return TRUE;