9
0
Fork 0

Fix bad assert in opendir

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@825 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2008-08-17 16:17:08 +00:00
parent 88572b5f65
commit 8672344900
1 changed files with 3 additions and 3 deletions

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