[09/14] getmntent.3: SYNOPSIS: Use 'restrict' in prototypes

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

Commit Message

Alejandro Colomar Feb. 28, 2021, 12:48 a.m. UTC
  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(-)
  

Patch

diff --git a/man3/getmntent.3 b/man3/getmntent.3
index 7f83ed248..96e642d18 100644
--- a/man3/getmntent.3
+++ b/man3/getmntent.3
@@ -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