diff mbox series

[17/23] rcmd.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210308185331.242176-18-alx.manpages@gmail.com
State New
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 4) | expand

Commit Message

Alejandro Colomar March 8, 2021, 6:53 p.m. UTC
glibc uses 'restrict' in rcmd(), rcmd_af(), iruserok_af().
Let's use it here too.

.../glibc$ grep_glibc_prototype rcmd
resolv/netdb.h:449:
extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
		 const char *__restrict __locuser,
		 const char *__restrict __remuser,
		 const char *__restrict __cmd, int *__restrict __fd2p);
.../glibc$ grep_glibc_prototype rcmd_af
resolv/netdb.h:461:
extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
		    const char *__restrict __locuser,
		    const char *__restrict __remuser,
		    const char *__restrict __cmd, int *__restrict __fd2p,
		    sa_family_t __af);
.../glibc$ grep_glibc_prototype iruserok_af
resolv/netdb.h:537:
extern int iruserok_af (const void *__raddr, int __suser,
			const char *__remuser, const char *__locuser,
			sa_family_t __af);
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/rcmd.3 | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/man3/rcmd.3 b/man3/rcmd.3
index 0349646c7..d2df6b629 100644
--- a/man3/rcmd.3
+++ b/man3/rcmd.3
@@ -49,28 +49,30 @@  stream to a remote command
 .nf
 .BR "#include <netdb.h>    " "/* Or <unistd.h> on some systems */"
 .PP
-.BI "int rcmd(char **" ahost ", unsigned short " inport ", const char *" locuser ,
-.BI "             const char *" remuser ", const char *" cmd ", int *" fd2p );
+.BI "int rcmd(char **restrict " ahost ", unsigned short " inport ,
+.BI "         const char *restrict " locuser ", const char *restrict " remuser ,
+.BI "         const char *restrict " cmd ", int *restrict " fd2p );
 .PP
 .BI "int rresvport(int *" port );
 .PP
 .BI "int iruserok(uint32_t " raddr ", int " superuser ,
-.BI "             const char *" ruser ", const char *" luser );
+.BI "         const char *" ruser ", const char *" luser );
 .BI "int ruserok(const char *" rhost ", int " superuser ,
-.BI "             const char *" ruser ", const char *" luser );
+.BI "         const char *" ruser ", const char *" luser );
 .PP
-.BI "int rcmd_af(char **" ahost ", unsigned short " inport ", const char *" locuser ,
-.BI "             const char *" remuser ", const char *" cmd ", int *" fd2p ,
-.BI "             sa_family_t " af );
+.BI "int rcmd_af(char **restrict " ahost ", unsigned short " inport ,
+.BI "         const char *restrict " locuser ", const char *restrict " remuser ,
+.BI "         const char *restrict " cmd ", int *restrict " fd2p ,
+.BI "         sa_family_t " af );
 .PP
 .BI "int rresvport_af(int *" port ", sa_family_t " af );
 .PP
-.BI "int iruserok_af(const void *" raddr ", int " superuser ,
-.BI "             const char *" ruser ", const char *" luser \
-", sa_family_t " af );
+.BI "int iruserok_af(const void *restrict " raddr ", int " superuser ,
+.BI "        const char *restrict " ruser ", const char *restrict " luser ,
+.BI "        sa_family_t " af );
 .BI "int ruserok_af(const char *" rhost ", int " superuser ,
-.BI "             const char *" ruser ", const char *" luser \
-", sa_family_t " af );
+.BI "        const char *" ruser ", const char *" luser ,
+.BI "        sa_family_t " af );
 .fi
 .PP
 .RS -4