summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-17 16:17:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-17 16:17:08 +0000
commit55e4f1ebc7d9236a746a456733e5b5606f7e0a57 (patch)
tree32a43a5c5e97e6beddcad78a7585116372619b03 /nuttx/fs
parent332a8cdade9fa5609a57b162d7a7e6d52ff91073 (diff)
downloadpx4-nuttx-55e4f1ebc7d9236a746a456733e5b5606f7e0a57.tar.gz
px4-nuttx-55e4f1ebc7d9236a746a456733e5b5606f7e0a57.tar.bz2
px4-nuttx-55e4f1ebc7d9236a746a456733e5b5606f7e0a57.zip
Fix bad assert in opendir
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@825 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fs_opendir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/fs/fs_opendir.c b/nuttx/fs/fs_opendir.c
index 969b1d164..ddb4611b8 100644
--- a/nuttx/fs/fs_opendir.c
+++ b/nuttx/fs/fs_opendir.c
@@ -184,13 +184,13 @@ FAR DIR *opendir(FAR const char *path)
/* We now need to back off our reference to the inode. We can't
* call inode_release() to do that unless we release the tree
* semaphore. The following should be safe because: (1) after the
- * reference count was incremented above it should be >1 so it should
- * not decrement to zero, and (2) we hold the tree semaphore so no
+ * reference count was incremented above it should be >=1 so it should
+ * not decrement below zero, and (2) we hold the tree semaphore so no
* other thread should be able to change the reference count.
*/
inode->i_crefs--;
- DEBUGASSERT(inode->i_crefs > 0);
+ DEBUGASSERT(inode->i_crefs >= 0);
/* Negate the error value so that it can be used to set errno */