Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2012-03-02 20:02:04 +0400
committerJeff Johnston <jjohnstn@redhat.com>2012-03-02 20:02:04 +0400
commit52cbb05cfb0556653faa1f4e06a5ede5c80b2c81 (patch)
tree6487b9f058c0bb75ffc6b360918d18cdf6ee5647 /newlib/libc/posix
parent2e398e84376c5a238a1b5dd0a9669ff289259064 (diff)
2012-03-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/posix/readdir_r.c: Fix return code when end of directory is reached.
Diffstat (limited to 'newlib/libc/posix')
-rw-r--r--newlib/libc/posix/readdir_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/posix/readdir_r.c b/newlib/libc/posix/readdir_r.c
index 9bc013c64..b9a0b9024 100644
--- a/newlib/libc/posix/readdir_r.c
+++ b/newlib/libc/posix/readdir_r.c
@@ -76,7 +76,7 @@ struct dirent *tmpdp;
__lock_release_recursive(dirp->dd_lock);
#endif
*dpp = NULL;
- return errno;
+ return dirp->dd_size == 0 ? 0 : errno;
}
}
if (dirp->dd_loc >= dirp->dd_size) {