From: v1ne Date: Wed, 1 Apr 2020 14:45:17 +0000 (+0200) Subject: ols: Use symbolic name for "success" error code. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=dcdc2848b790310d9b197c5339298ad511f54be0;p=libsigrok.git ols: Use symbolic name for "success" error code. Reviewed-By: Wolfram Sang --- 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;