From a78622d7bff1ff02aaec81b9835c07176dd1478f Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 17 Sep 2024 17:43:56 +0900 Subject: [PATCH] file_read: fix a bogus cast --- fs/vfs/fs_read.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/vfs/fs_read.c b/fs/vfs/fs_read.c index edb5574419..08acce27de 100644 --- a/fs/vfs/fs_read.c +++ b/fs/vfs/fs_read.c @@ -65,7 +65,7 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes) { FAR struct inode *inode; - int ret = -EBADF; + ssize_t ret = -EBADF; DEBUGASSERT(filep); inode = filep->f_inode; @@ -90,9 +90,9 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes) * signature and position in the operations vtable. */ - ret = (int)inode->u.i_ops->read(filep, - (FAR char *)buf, - (size_t)nbytes); + ret = inode->u.i_ops->read(filep, + (FAR char *)buf, + (size_t)nbytes); } /* Return the number of bytes read (or possibly an error code) */