]> sigrok.org Git - libsigrok.git/commitdiff
ols: Use symbolic name for "success" error code.
authorv1ne <redacted>
Wed, 1 Apr 2020 14:45:17 +0000 (16:45 +0200)
committerGerhard Sittig <redacted>
Mon, 24 Aug 2020 05:43:03 +0000 (07:43 +0200)
Reviewed-By: Wolfram Sang <redacted>
src/hardware/openbench-logic-sniffer/protocol.c

index 0a2bc4dd60b999903a2963ce9ebff6fdc4504dcd..9a36c8c89513231fc33cb2bb69e993c0b011f86e 100644 (file)
@@ -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;