From: Alejandro Colomar Date: Sat, 13 Feb 2021 23:10:13 +0000 (+0100) Subject: getsockopt.2: SYNOPSIS: Use 'restrict' in prototypes X-Git-Tag: man-pages-5.11~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78eb47fc8fdb3752f961bef401a0726b4e1884d0;p=thirdparty%2Fman-pages.git getsockopt.2: SYNOPSIS: Use 'restrict' in prototypes POSIX specifies that the parameters of getsockopt() shall be 'restrict'. Glibc uses 'restrict' too. Let's use it here too. ...... .../glibc$ grep_glibc_prototype getsockopt socket/sys/socket.h:208: extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- diff --git a/man2/getsockopt.2 b/man2/getsockopt.2 index 9e33b2d4f5..9b2c6cc3df 100644 --- a/man2/getsockopt.2 +++ b/man2/getsockopt.2 @@ -50,7 +50,7 @@ getsockopt, setsockopt \- get and set options on sockets .B #include .PP .BI "int getsockopt(int " sockfd ", int " level ", int " optname , -.BI " void *" optval ", socklen_t *" optlen ); +.BI " void *restrict " optval ", socklen_t *restrict " optlen ); .BI "int setsockopt(int " sockfd ", int " level ", int " optname , .BI " const void *" optval ", socklen_t " optlen ); .fi