readdir_r.3: SYNOPSIS: Use 'restrict' in prototypes

Both POSIX and glibc use 'restrict' in readdir_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype readdir_r
dirent/dirent.h:183:
extern int readdir_r (DIR *__restrict __dirp,
		      struct dirent *__restrict __entry,
		      struct dirent **__restrict __result)
     __nonnull ((1, 2, 3)) __attribute_deprecated__;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-03-08 19:53:27 +01:00 committed by Michael Kerrisk
parent a353324694
commit 1c82c77213
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ readdir_r \- read a directory
.nf
.B #include <dirent.h>
.PP
.BI "int readdir_r(DIR *" dirp ", struct dirent *" entry \
", struct dirent **" result );
.BI "int readdir_r(DIR *restrict " dirp ", struct dirent *restrict " entry ,
.BI " struct dirent **restrict " result );
.fi
.PP
.RS -4