diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2012-03-02 20:02:04 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2012-03-02 20:02:04 +0400 |
commit | 52cbb05cfb0556653faa1f4e06a5ede5c80b2c81 (patch) | |
tree | 6487b9f058c0bb75ffc6b360918d18cdf6ee5647 /newlib/libc | |
parent | 2e398e84376c5a238a1b5dd0a9669ff289259064 (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')
-rw-r--r-- | newlib/libc/posix/readdir_r.c | 2 |
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) { |