[PATCH 03/14] getsockopt.2: SYNOPSIS: Use 'restrict' in prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <alx.manpages@xxxxxxxxx>
---
 man2/getsockopt.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/getsockopt.2 b/man2/getsockopt.2
index 9e33b2d4f..9b2c6cc3d 100644
--- a/man2/getsockopt.2
+++ b/man2/getsockopt.2
@@ -50,7 +50,7 @@ getsockopt, setsockopt \- get and set options on sockets
 .B #include <sys/socket.h>
 .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
-- 
2.30.0




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux