From c063ba610a6058cacddf2e3d156f478c7b969f87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Mar 1998 11:10:51 +0000 Subject: Update. 1998-03-10 19:43 Matthias Urlichs * sysdeps/unix/readdir_r.c: zero out *result on EOF. * sysdeps/unix/sysv/linux/readdir64_r.c: Likewise. * manual/filesys/texi: document this. --- manual/filesys.texi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manual') diff --git a/manual/filesys.texi b/manual/filesys.texi index 3b125cd..951ae79 100644 --- a/manual/filesys.texi +++ b/manual/filesys.texi @@ -354,6 +354,9 @@ successfully. In this case a pointer to the result is returned in the function returns a value indicating the error (as described for @code{readdir}). +If there are no more directory entries, @code{readdir_r}'s return value is +@code{0}, and *@var{result} is set to @code{NULL}. + @strong{Portability Note:} On some systems, @code{readdir_r} may not return a terminated string as the file name even if no @code{d_reclen} element is available in @code{struct dirent} and the file name as the -- cgit v1.1