From 6a92a3e71a2b1a4de9ef558d54172f526ce5f020 Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Tue, 24 Aug 2021 12:27:52 +0000 Subject: [PATCH] iodev, usb_dwc3: cosmetic fixes Signed-off-by: Pip Cet --- src/iodev.c | 2 +- src/usb_dwc3.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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); }