diff --git a/src/iodev.c b/src/iodev.c index 1dba18a2..8125be26 100644 --- a/src/iodev.c +++ b/src/iodev.c @@ -33,7 +33,7 @@ size_t con_rp[IODEV_MAX]; ssize_t iodev_can_read(iodev_id_t id) { if (!iodevs[id]->ops->can_read) - return false; + return 0; return iodevs[id]->ops->can_read(iodevs[id]->opaque); } diff --git a/src/usb_dwc3.c b/src/usb_dwc3.c index 935ef82f..d4fe90eb 100644 --- a/src/usb_dwc3.c +++ b/src/usb_dwc3.c @@ -1368,11 +1368,11 @@ size_t usb_dwc3_read(dwc3_dev_t *dev, cdc_acm_pipe_id_t pipe, void *buf, size_t ssize_t usb_dwc3_can_read(dwc3_dev_t *dev, cdc_acm_pipe_id_t pipe) { if (!dev || !dev->ready) - return false; + return 0; ringbuffer_t *host2device = dev->pipe[pipe].host2device; if (!host2device) - return false; + return 0; return ringbuffer_get_used(host2device); }