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

glibc uses 'restrict' in getpwent_r(), fgetpwent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getpwent_r
pwd/pwd.h:139:
extern int getpwent_r (struct passwd *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct passwd **__restrict __result)
		       __nonnull ((1, 2, 4));
.../glibc$ grep_glibc_prototype fgetpwent_r
pwd/pwd.h:166:
extern int fgetpwent_r (FILE *__restrict __stream,
			struct passwd *__restrict __resultbuf,
			char *__restrict __buffer, size_t __buflen,
			struct passwd **__restrict __result)
			__nonnull ((1, 2, 3, 5));
.../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-02-28 01:48:17 +01:00 committed by Michael Kerrisk
parent 698bf7902f
commit 69b7afbe94
1 changed files with 7 additions and 4 deletions

View File

@ -28,10 +28,13 @@ getpwent_r, fgetpwent_r \- get passwd file entry reentrantly
.nf
.B #include <pwd.h>
.PP
.BI "int getpwent_r(struct passwd *" pwbuf ", char *" buf ,
.BI " size_t " buflen ", struct passwd **" pwbufp );
.BI "int fgetpwent_r(FILE *" stream ", struct passwd *" pwbuf ", char *" buf ,
.BI " size_t " buflen ", struct passwd **" pwbufp );
.BI "int getpwent_r(struct passwd *restrict " pwbuf ,
.BI " char *restrict " buf ", size_t " buflen ,
.BI " struct passwd **restrict " pwbufp );
.BI "int fgetpwent_r(FILE *restrict " stream \
", struct passwd *restrict " pwbuf ,
.BI " char *restrict " buf ", size_t " buflen ,
.BI " struct passwd **restrict " pwbufp );
.fi
.PP
.RS -4