getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes

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>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-02-28 01:48:05 +01:00 committed by Michael Kerrisk
parent 2b19457ac5
commit 854214715b
1 changed files with 6 additions and 5 deletions

View File

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