Fix bad assert in opendir

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@825 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-08-17 16:17:08 +00:00
parent 161898863a
commit 2878532acb

View File

@ -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 */