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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 man3/getmntent.3 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

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
-- 
2.30.1.721.g45526154a5




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux