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

glibc uses 'restrict' in addmntent(), getmntent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype addmntent
misc/mntent.h:81:
extern int addmntent (FILE *__restrict __stream,
		      const struct mntent *__restrict __mnt) __THROW;
.../glibc$ grep_glibc_prototype getmntent_r
misc/mntent.h:73:
extern struct mntent *getmntent_r (FILE *__restrict __stream,
				   struct mntent *__restrict __result,
				   char *__restrict __buffer,
				   int __bufsize) __THROW;
.../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:13 +01:00 committed by Michael Kerrisk
parent 22f4c26563
commit 8fbe36d625
1 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,8 @@ getmntent_r \- get filesystem descriptor file entry
.PP
.BI "struct mntent *getmntent(FILE *" stream );
.PP
.BI "int addmntent(FILE *" stream ", const struct mntent *" mnt );
.BI "int addmntent(FILE *restrict " stream ,
.BI " const struct mntent *restrict " mnt );
.PP
.BI "int endmntent(FILE *" streamp );
.PP
@ -51,8 +52,9 @@ getmntent_r \- get filesystem descriptor file entry
/* GNU extension */
.B #include <mntent.h>
.PP
.BI "struct mntent *getmntent_r(FILE *" streamp ", struct mntent *" mntbuf ,
.BI " char *" buf ", int " buflen );
.BI "struct mntent *getmntent_r(FILE *restrict " streamp ,
.BI " struct mntent *restrict " mntbuf ,
.BI " char *restrict " buf ", int " buflen );
.fi
.PP
.RS -4