aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2008-04-20 03:00:32 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2008-04-20 03:00:32 +0000
commit559539dc7846489778f0bbbc0372585474921862 (patch)
tree2633308c90b4cfca05374c15528d2085fc9ae616
parentefe52fbe46b73a6e34a4492823c07752e74ee3e7 (diff)
downloaduClibc-559539dc7846489778f0bbbc0372585474921862.tar.gz
uClibc-559539dc7846489778f0bbbc0372585474921862.tar.bz2
merge rev 16020 from trunk
-rw-r--r--libc/misc/dirent/readdir_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/dirent/readdir_r.c b/libc/misc/dirent/readdir_r.c
index aeccdd823..71cd4568d 100644
--- a/libc/misc/dirent/readdir_r.c
+++ b/libc/misc/dirent/readdir_r.c
@@ -25,7 +25,7 @@ int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result)
bytes = __getdents(dir->dd_fd, dir->dd_buf, dir->dd_max);
if (bytes <= 0) {
*result = NULL;
- ret = errno;
+ ret = (bytes==0)? 0 : errno;
goto all_done;
}
dir->dd_size = bytes;