]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/colead-slm/protocol.c
drivers/input: Remove some hardcoded values.
[libsigrok.git] / src / hardware / colead-slm / protocol.c
index b577f236c0ac85de0ba475a9338660ba63379b78..570e7db33a6a918eecff07f11bf2a9817dcd09be 100644 (file)
@@ -202,7 +202,7 @@ SR_PRIV int colead_slm_receive_data(int fd, int revents, void *cb_data)
 
        serial = sdi->conn;
        if (devc->state == IDLE) {
-               if (serial_read_nonblocking(serial, buf, 128) != 1 || buf[0] != 0x10)
+               if (serial_read_nonblocking(serial, buf, sizeof(buf)) != 1 || buf[0] != 0x10)
                        /* Nothing there, or caught the tail end of a previous packet,
                         * or some garbage. Unless it's a single "data ready" byte,
                         * we don't want it. */