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

glibc uses 'restrict' in scandirat().
Let's use it here too.

.../glibc$ grep_glibc_prototype scandirat
dirent/dirent.h:293:
extern int scandirat (int __dfd, const char *__restrict __dir,
		      struct dirent ***__restrict __namelist,
		      int (*__selector) (const struct dirent *),
		      int (*__cmp) (const struct dirent **,
				    const struct dirent **))
     __nonnull ((2, 3));
.../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:32 +01:00 committed by Michael Kerrisk
parent 2866f31e8b
commit fe817dd03c
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ a directory for matching entries
.BR "#include <fcntl.h>" " /* Definition of AT_* constants */"
.B #include <dirent.h>
.PP
.BI "int scandirat(int " dirfd ", const char *" dirp ", struct dirent ***" namelist ,
.BI "int scandirat(int " dirfd ", const char *restrict " dirp ", struct dirent ***restrict " namelist ,
.BI " int (*" filter ")(const struct dirent *),"
.BI " int (*" compar ")(const struct dirent **,"
.BI " const struct dirent **));"