diff mbox series

[01/14] getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210228004817.122463-2-alx.manpages@gmail.com
State Not Applicable
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) | expand

Commit Message

Alejandro Colomar \(man-pages\) Feb. 28, 2021, 12:48 a.m. UTC
Both POSIX and glibc use 'restrict' in getaddrinfo().
Let's use it here too.

.../glibc$ grep_glibc_prototype getaddrinfo;
resolv/netdb.h:660:
extern int getaddrinfo (const char *__restrict __name,
			const char *__restrict __service,
			const struct addrinfo *__restrict __req,
			struct addrinfo **__restrict __pai);
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/getaddrinfo.3 | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3
index db397bdf8..37710c277 100644
--- a/man3/getaddrinfo.3
+++ b/man3/getaddrinfo.3
@@ -51,13 +51,14 @@  service translation
 .B #include <sys/socket.h>
 .B #include <netdb.h>
 .PP
-.BI "int getaddrinfo(const char *" "node" ", const char *" "service" ,
-.BI "                const struct addrinfo *" "hints" ,
-.BI "                struct addrinfo **" "res" );
+.BI "int getaddrinfo(const char *restrict " node ,
+.BI "                const char *restrict " service ,
+.BI "                const struct addrinfo *restrict " hints ,
+.BI "                struct addrinfo **restrict " res );
 .PP
-.BI "void freeaddrinfo(struct addrinfo *" "res" );
+.BI "void freeaddrinfo(struct addrinfo *" res );
 .PP
-.BI "const char *gai_strerror(int " "errcode" );
+.BI "const char *gai_strerror(int " errcode );
 .fi
 .PP
 .RS -4