[23/23] scandir.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210308185331.242176-24-alx.manpages@gmail.com
State New
Headers show
Series
  • man3: SYNOPSIS: Use 'restrict' in prototypes (batch 4)
Related show

Commit Message

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>

---
 man3/scandir.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.1

Patch

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 <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 **));"