X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fopenbench-logic-sniffer%2Fprotocol.c;h=9a36c8c89513231fc33cb2bb69e993c0b011f86e;hp=0a2bc4dd60b999903a2963ce9ebff6fdc4504dcd;hb=dcdc2848b790310d9b197c5339298ad511f54be0;hpb=a80bed765601fe72f73ddb4183ea0c4a0a6934d7 diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware/openbench-logic-sniffer/protocol.c index 0a2bc4dd..9a36c8c8 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.c +++ b/src/hardware/openbench-logic-sniffer/protocol.c @@ -30,7 +30,7 @@ SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial, if (serial_write_blocking(serial, buf, 1, serial_timeout(serial, 1)) != 1) return SR_ERR; - if (serial_drain(serial) != 0) + if (serial_drain(serial) != SR_OK) return SR_ERR; return SR_OK; @@ -51,7 +51,7 @@ SR_PRIV int send_longcommand(struct sr_serial_dev_inst *serial, if (serial_write_blocking(serial, buf, 5, serial_timeout(serial, 1)) != 5) return SR_ERR; - if (serial_drain(serial) != 0) + if (serial_drain(serial) != SR_OK) return SR_ERR; return SR_OK;