[PATCH 12/14] getprotoent_r.3: SYNOPSIS: Use 'restrict' in prototypes

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

 



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




[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