[PATCH 01/22] getservent_r.3: SYNOPSIS: Use 'restrict' in prototypes

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

 



glibc uses 'restrict' in getservent_r(), getservbyname_r(),
getservbyport_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getservent_r
resolv/netdb.h:306:
extern int getservent_r (struct servent *__restrict __result_buf,
			 char *__restrict __buf, size_t __buflen,
			 struct servent **__restrict __result);
.../glibc$ grep_glibc_prototype getservbyname_r
resolv/netdb.h:310:
extern int getservbyname_r (const char *__restrict __name,
			    const char *__restrict __proto,
			    struct servent *__restrict __result_buf,
			    char *__restrict __buf, size_t __buflen,
			    struct servent **__restrict __result);
.../glibc$ grep_glibc_prototype getservbyport_r
resolv/netdb.h:316:
extern int getservbyport_r (int __port, const char *__restrict __proto,
			    struct servent *__restrict __result_buf,
			    char *__restrict __buf, size_t __buflen,
			    struct servent **__restrict __result);
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man3/getservent_r.3 | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/man3/getservent_r.3 b/man3/getservent_r.3
index ad7fd22e4..c73a93afc 100644
--- a/man3/getservent_r.3
+++ b/man3/getservent_r.3
@@ -31,14 +31,19 @@ service entry (reentrant)
 .nf
 .B #include <netdb.h>
 .PP
-.BI "int getservent_r(struct servent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct servent **" result );
-.BI "int getservbyname_r(const char *" name ", const char *" proto ,
-.BI "                struct servent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct servent **" result );
-.BI "int getservbyport_r(int " port ", const char *" proto ,
-.BI "                struct servent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct servent **" result );
+.BI "int getservent_r(struct servent *restrict " result_buf ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct servent **restrict " result );
+.BI "int getservbyname_r(const char *restrict " name ,
+.BI "                 const char *restrict " proto ,
+.BI "                 struct servent *restrict " result_buf ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct servent **restrict " result );
+.BI "int getservbyport_r(int " port ,
+.BI "                 const char *restrict " proto ,
+.BI "                 struct servent *restrict " result_buf ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct servent **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