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 03/24] setaliasent.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Wed, 10 Mar 2021 19:31:29 +0100 [thread overview]
Message-ID: <20210310183149.194717-4-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com>
glibc uses 'restrict' in getaliasent_r(), getaliasbyname_r().
Let's use it here too.
.../glibc$ grep_glibc_prototype getaliasent_r
inet/aliases.h:48:
extern int getaliasent_r (struct aliasent *__restrict __result_buf,
char *__restrict __buffer, size_t __buflen,
struct aliasent **__restrict __result) __THROW;
.../glibc$ grep_glibc_prototype getaliasbyname_r
inet/aliases.h:56:
extern int getaliasbyname_r (const char *__restrict __name,
struct aliasent *__restrict __result_buf,
char *__restrict __buffer, size_t __buflen,
struct aliasent **__restrict __result) __THROW;
.../glibc$
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man3/setaliasent.3 | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/man3/setaliasent.3 b/man3/setaliasent.3
index 027bc91b6..b1b3a4ae5 100644
--- a/man3/setaliasent.3
+++ b/man3/setaliasent.3
@@ -18,14 +18,15 @@ getaliasbyname, getaliasbyname_r \- read an alias entry
.B "void endaliasent(void);"
.PP
.B "struct aliasent *getaliasent(void);"
-.BI "int getaliasent_r(struct aliasent *" result ","
-.BI " char *" buffer ", size_t " buflen \
-", struct aliasent **" res );
+.BI "int getaliasent_r(struct aliasent *restrict " result ,
+.BI " char *restrict " buffer ", size_t " buflen ,
+.BI " struct aliasent **restrict " res );
.PP
.BI "struct aliasent *getaliasbyname(const char *" name );
-.BI "int getaliasbyname_r(const char *" name ", struct aliasent *" result ,
-.BI " char *" buffer ", size_t " buflen \
-", struct aliasent **" res );
+.BI "int getaliasbyname_r(const char *restrict " name ,
+.BI " struct aliasent *restrict " result ,
+.BI " char *restrict " buffer ", size_t " buflen ,
+.BI " struct aliasent **restrict " res );
.fi
.SH DESCRIPTION
One of the databases available with the Name Service Switch (NSS)
--
2.30.1.721.g45526154a5
next prev parent reply other threads:[~2021-03-10 18:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 18:31 [PATCH 00/24] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 5) Alejandro Colomar
2021-03-10 18:31 ` [PATCH 01/24] sem_getvalue.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-10 18:31 ` [PATCH 02/24] sem_wait.3: " Alejandro Colomar
2021-03-10 18:31 ` Alejandro Colomar [this message]
2021-03-10 18:31 ` [PATCH 04/24] setbuf.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 05/24] " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 06/24] setnetgrent.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 07/24] sigwait.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 08/24] statvfs.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 09/24] stpcpy.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 10/24] stpncpy.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 11/24] strcat.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 12/24] strcpy.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 13/24] strfmon.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 14/24] strftime.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 15/24] string.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 16/24] " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 17/24] strptime.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 18/24] strsep.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 19/24] strtod.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 20/24] strtoimax.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 21/24] strtok.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 22/24] strtol.3, strtoul.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 23/24] strxfrm.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 24/24] swab.3: " Alejandro Colomar
2021-03-14 20:51 ` [PATCH 00/24] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 5) Michael Kerrisk (man-pages)
2021-03-14 20:53 ` Michael Kerrisk (man-pages)
2021-03-19 21:08 ` Alejandro Colomar (man-pages)
2021-03-19 20:59 ` Alejandro Colomar (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=20210310183149.194717-4-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).