file_read: fix a bogus cast

This commit is contained in:
YAMAMOTO Takashi 2024-09-17 17:43:56 +09:00 committed by Xiang Xiao
parent a6c3de6e89
commit a78622d7bf
1 changed files with 4 additions and 4 deletions

View File

@ -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,7 +90,7 @@ 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,
ret = inode->u.i_ops->read(filep,
(FAR char *)buf,
(size_t)nbytes);
}