From fe817dd03ca1745dd2505fbbf47d0d0cf42e781c Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 8 Mar 2021 19:53:32 +0100 Subject: [PATCH] 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 Signed-off-by: Michael Kerrisk --- man3/scandir.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/scandir.3 b/man3/scandir.3 index 262e125c1..50328130f 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -78,7 +78,7 @@ a directory for matching entries .BR "#include " " /* Definition of AT_* constants */" .B #include .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 **));"