Skip to content
Snippets Groups Projects
Commit 2878532a authored by patacongo's avatar patacongo
Browse files

Fix bad assert in opendir

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@825 42af7a65-404d-4744-a932-0658087f49c3
parent 16189886
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment