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

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

Commit Message

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>

---
 man3/readdir_r.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.1

Patch

diff --git a/man3/readdir_r.3 b/man3/readdir_r.3
index f330adb35..ad8f405f8 100644
--- a/man3/readdir_r.3
+++ b/man3/readdir_r.3
@@ -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