diff mbox series

[05/14] getgrent_r.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210228004817.122463-6-alx.manpages@gmail.com
State Not Applicable
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) | expand

Commit Message

Alejandro Colomar \(man-pages\) Feb. 28, 2021, 12:48 a.m. UTC
glibc uses 'restrict' in getgrent_r(), fgetgrent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getgrent_r
grp/grp.h:131:
extern int getgrent_r (struct group *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct group **__restrict __result);
.../glibc$ grep_glibc_prototype fgetgrent_r
grp/grp.h:161:
extern int fgetgrent_r (FILE *__restrict __stream,
			struct group *__restrict __resultbuf,
			char *__restrict __buffer, size_t __buflen,
			struct group **__restrict __result);
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/getgrent_r.3 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3
index 55d9d698f..29f063a0a 100644
--- a/man3/getgrent_r.3
+++ b/man3/getgrent_r.3
@@ -28,10 +28,12 @@  getgrent_r, fgetgrent_r \- get group file entry reentrantly
 .nf
 .B #include <grp.h>
 .PP
-.BI "int getgrent_r(struct group *" gbuf ", char *" buf ,
-.BI "               size_t " buflen ", struct group **" gbufp );
-.BI "int fgetgrent_r(FILE *" stream ", struct group *" gbuf ", char *" buf ,
-.BI "               size_t " buflen ", struct group **" gbufp );
+.BI "int getgrent_r(struct group *restrict " gbuf ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct group **restrict " gbufp );
+.BI "int fgetgrent_r(FILE *restrict " stream ", struct group *restrict " gbuf ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct group **restrict " gbufp );
 .fi
 .PP
 .RS -4