readdir_r(): Add restrict keyword per Single UNIX Specification

This commit is contained in:
Sahil Patnayakunii
2013-07-24 13:10:32 -05:00
committed by Joel Sherrill
parent cc86fe1fd2
commit 5711ecffef

View File

@@ -20,7 +20,11 @@
* The RTEMS version of readdir is already thread-safe. * The RTEMS version of readdir is already thread-safe.
* This routine is reentrant version of readdir(). * This routine is reentrant version of readdir().
*/ */
int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) int readdir_r(
DIR *__restrict dirp,
struct dirent *__restrict entry,
struct dirent **__restrict result
)
{ {
*result = readdir(dirp); *result = readdir(dirp);
if (*result) if (*result)