public inbox for libc-alpha@sourceware.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 12/14] getprotoent_r.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Sun, 28 Feb 2021 01:48:16 +0100	[thread overview]
Message-ID: <20210228004817.122463-13-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210228004817.122463-1-alx.manpages@gmail.com>

glibc uses 'restrict' in getprotoent_r(), getprotobyname_r(),
getprotobynumber_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getprotoent_r
resolv/netdb.h:372:
extern int getprotoent_r (struct protoent *__restrict __result_buf,
			  char *__restrict __buf, size_t __buflen,
			  struct protoent **__restrict __result);
.../glibc$ grep_glibc_prototype getprotobyname_r
resolv/netdb.h:376:
extern int getprotobyname_r (const char *__restrict __name,
			     struct protoent *__restrict __result_buf,
			     char *__restrict __buf, size_t __buflen,
			     struct protoent **__restrict __result);
.../glibc$ grep_glibc_prototype getprotobynumber_r
resolv/netdb.h:381:
extern int getprotobynumber_r (int __proto,
			       struct protoent *__restrict __result_buf,
			       char *__restrict __buf, size_t __buflen,
			       struct protoent **__restrict __result);
.../glibc$

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

diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3
index 55e37d0c9..651ec00c2 100644
--- a/man3/getprotoent_r.3
+++ b/man3/getprotoent_r.3
@@ -31,14 +31,17 @@ protocol entry (reentrant)
 .nf
 .B #include <netdb.h>
 .PP
-.BI "int getprotoent_r(struct protoent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct protoent **" result );
-.BI "int getprotobyname_r(const char *" name ,
-.BI "                struct protoent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct protoent **" result );
+.BI "int getprotoent_r(struct protoent *restrict " result_buf ,
+.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  struct protoent **restrict " result );
+.BI "int getprotobyname_r(const char *restrict " name ,
+.BI "                  struct protoent *restrict " result_buf ,
+.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  struct protoent **restrict " result );
 .BI "int getprotobynumber_r(int " proto ,
-.BI "                struct protoent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct protoent **" result );
+.BI "                  struct protoent *restrict " result_buf ,
+.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  struct protoent **restrict " result );
 .PP
 .fi
 .RS -4
-- 
2.30.1.721.g45526154a5


  parent reply	other threads:[~2021-02-28  0:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
2021-02-28  0:48 ` [PATCH 01/14] getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-02-28  0:48 ` [PATCH 02/14] getaddrinfo_a.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 03/14] getdate.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 04/14] getdirentries.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 05/14] getgrent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 06/14] getgrnam.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 07/14] gethostbyname.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 08/14] getline.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 09/14] getmntent.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 10/14] getnameinfo.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 11/14] getnetent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` Alejandro Colomar [this message]
2021-02-28  0:48 ` [PATCH 13/14] getpwent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 14/14] getpwnam.3: " Alejandro Colomar
2021-03-03 22:25 ` [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Michael Kerrisk (man-pages)

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=20210228004817.122463-13-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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).