public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: [PATCH 17/23] rcmd.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Mon,  8 Mar 2021 19:53:26 +0100	[thread overview]
Message-ID: <20210308185331.242176-18-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210308185331.242176-1-alx.manpages@gmail.com>

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 --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
-- 
2.30.1


  parent reply	other threads:[~2021-03-08 18:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 18:53 [PATCH 00/23] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 4) Alejandro Colomar
2021-03-08 18:53 ` [PATCH 01/23] pthread_attr_setschedpolicy.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-08 18:53 ` [PATCH 02/23] pthread_attr_setscope.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 03/23] pthread_attr_setstackaddr.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 04/23] pthread_attr_setstacksize.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 05/23] pthread_attr_setstack.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 06/23] pthread_create.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 07/23] pthread_getattr_default_np.3: SYNOPSIS: Add missing 'const' Alejandro Colomar
2021-03-08 18:53 ` [PATCH 08/23] pthread_mutexattr_getpshared.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-08 18:53 ` [PATCH 09/23] pthread_mutexattr_setrobust.3: SYNOPSIS: Remove incorrect 'const' Alejandro Colomar
2021-03-08 18:53 ` [PATCH 10/23] pthread_rwlockattr_setkind_np.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-08 18:53 ` [PATCH 11/23] pthread_setschedparam.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 12/23] putgrent.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 13/23] putpwent.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 14/23] puts.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 15/23] qecvt.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 16/23] random_r.3: " Alejandro Colomar
2021-03-08 18:53 ` Alejandro Colomar [this message]
2021-03-08 18:53 ` [PATCH 18/23] readdir_r.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 19/23] realpath.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 20/23] regex.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 21/23] rexec.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 22/23] scandir.3: " Alejandro Colomar
2021-03-08 18:53 ` [PATCH 23/23] " Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210308185331.242176-18-alx.manpages@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox