This is an automated email from the ASF dual-hosted git repository.
davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 30bae2ca47 fs/cromfs: Fix faulty DEBUGASSERT() check
30bae2ca47 is described below
commit 30bae2ca47c8561e1ff142dd164bb1acfc461684
Author: Ville Juven <[email protected]>
AuthorDate: Fri Apr 21 14:51:59 2023 +0300
fs/cromfs: Fix faulty DEBUGASSERT() check
The logic being tested is wrong, obviously when accessing file the
driver private data has to be valid (open() has been called).
---
fs/cromfs/fs_cromfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cromfs/fs_cromfs.c b/fs/cromfs/fs_cromfs.c
index f1d03e3dfc..b3770dd803 100644
--- a/fs/cromfs/fs_cromfs.c
+++ b/fs/cromfs/fs_cromfs.c
@@ -1153,7 +1153,7 @@ static int cromfs_fstat(FAR const struct file *filep, FAR
struct stat *buf)
/* Sanity checks */
- DEBUGASSERT(filep->f_priv == NULL && filep->f_inode != NULL);
+ DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
/* Get the mountpoint inode reference from the file structure and the
* volume private data from the inode structure