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

Both POSIX and glibc use 'restrict' in getnameinfo().
Let's use it here too.

I consciously did an exception with respect to the right margin
of the rendered page.  Instead of having the right margin at 78
as usual (per Branden's recommendation), I let it use col 79
this time, to avoid breaking the prototype in an ugly way.

.../glibc$ grep_glibc_prototype getnameinfo
resolv/netdb.h:675:
extern int getnameinfo (const struct sockaddr *__restrict __sa,
			socklen_t __salen, char *__restrict __host,
			socklen_t __hostlen, char *__restrict __serv,
			socklen_t __servlen, int __flags);
.../glibc$

Cc: G. Branden Robinson <g.branden.robinson@gmail.com>
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:14 +01:00 committed by Michael Kerrisk
parent 8fbe36d625
commit ce73ed19b0
1 changed files with 5 additions and 3 deletions

View File

@ -15,9 +15,11 @@ getnameinfo \- address-to-name translation in protocol-independent manner
.B #include <sys/socket.h>
.B #include <netdb.h>
.PP
.BI "int getnameinfo(const struct sockaddr *" "addr" ", socklen_t " "addrlen" ,
.BI " char *" "host" ", socklen_t " "hostlen" ,
.BI " char *" "serv" ", socklen_t " "servlen" ", int " "flags" );
.BI "int getnameinfo(const struct sockaddr *restrict " addr \
", socklen_t " addrlen ,
.BI " char *restrict " host ", socklen_t " hostlen ,
.BI " char *restrict " serv ", socklen_t " servlen \
", int " flags );
.fi
.PP
.RS -4