[PATCH 03/24] setaliasent.3: SYNOPSIS: Use 'restrict' in prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux