[PATCH 06/24] setnetgrent.3: SYNOPSIS: Use 'restrict' in prototypes

Alejandro Colomar
2021-03-10T18:33:08Z

glibc uses 'restrict' in getnetgrent(), getnetgrent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getnetgrent
resolv/netdb.h:410:
extern int getnetgrent (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp);
.../glibc$ grep_glibc_prototype getnetgrent_r
resolv/netdb.h:430:
extern int getnetgrent_r (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp,
char *__restrict __buffer, size_t __buflen);
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man3/setnetgrent.3 | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/man3/setnetgrent.3 b/man3/setnetgrent.3
index 440cf2846..2a783ee58 100644
--- a/man3/setnetgrent.3
+++ b/man3/setnetgrent.3
@@ -18,12 +18,14 @@ handle network group entries
.BI "int setnetgrent(const char *" netgroup );
.B "void endnetgrent(void);"
.PP
-.BI "int getnetgrent(char **" host ", char **" user ", char **" domain );
-.BI "int getnetgrent_r(char **" host ", char **" user ","
-.BI " char **" domain ", char *" buf ", size_t " buflen );
+.BI "int getnetgrent(char **restrict " host ,
+.BI " char **restrict " user ", char **restrict " domain );
+.BI "int getnetgrent_r(char **restrict " host ,
+.BI " char **restrict " user ", char **restrict " domain ,
+.BI " char *restrict " buf ", size_t " buflen );
.PP
-.BI "int innetgr(const char *" netgroup ", const char *" host ","
-.BI " const char *" user ", const char *" domain );
+.BI "int innetgr(const char *" netgroup ", const char *" host ,
+.BI " const char *" user ", const char *" domain );
.fi
.PP
.RS -4
--
2.30.1.721.g45526154a5