diff mbox series

[05/22] inet_ntop.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210305235105.177359-6-alx.manpages@gmail.com
State Not Applicable
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3) | expand

Commit Message

Alejandro Colomar March 5, 2021, 11:50 p.m. UTC
Both POSIX and glibc use 'restrict' in inet_ntop().
Let's use it here too.

.../glibc$ grep_glibc_prototype inet_ntop
inet/arpa/inet.h:64:
extern const char *inet_ntop (int __af, const void *__restrict __cp,
			      char *__restrict __buf, socklen_t __len)
     __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/inet_ntop.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/man3/inet_ntop.3 b/man3/inet_ntop.3
index 9abb9556d..fc15ba859 100644
--- a/man3/inet_ntop.3
+++ b/man3/inet_ntop.3
@@ -30,8 +30,8 @@  inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form
 .nf
 .B #include <arpa/inet.h>
 .PP
-.BI "const char *inet_ntop(int " "af" ", const void *" "src" ,
-.BI "                      char *" "dst" ", socklen_t " "size" );
+.BI "const char *inet_ntop(int " af ", const void *restrict " src ,
+.BI "                      char *restrict " dst ", socklen_t " size );
 .fi
 .SH DESCRIPTION
 This function converts the network address structure