getpeername.2: SYNOPSIS: Use 'restrict' in prototypes

POSIX specifies that the parameters of getpeername()
shall be 'restrict'.  Glibc uses 'restrict' too.
Let's use it here too.

......

.../glibc$ grep_glibc_prototype getpeername
socket/sys/socket.h:130:
extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
			socklen_t *__restrict __len) __THROW;
.../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-14 00:10:12 +01:00 committed by Michael Kerrisk
parent e234eef0c6
commit 8de93cea54
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ getpeername \- get name of connected peer socket
.nf
.B #include <sys/socket.h>
.PP
.BI "int getpeername(int " sockfd ", struct sockaddr *" addr \
", socklen_t *" addrlen );
.BI "int getpeername(int " sockfd ", struct sockaddr *restrict " addr ,
.BI " socklen_t *restrict " addrlen );
.fi
.SH DESCRIPTION
.BR getpeername ()