[09/14] getmntent.3: SYNOPSIS: Use 'restrict' in prototypes
Commit Message
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>
---
man3/getmntent.3 | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
@@ -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