]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
inet_pton.3: SYNOPSIS: Use 'restrict' in prototypes
authorAlejandro Colomar <alx.manpages@gmail.com>
Fri, 5 Mar 2021 23:50:50 +0000 (00:50 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 7 Mar 2021 10:16:21 +0000 (11:16 +0100)
Both POSIX and glibc use 'restrict' in inet_pton().
Let's use it here too.

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

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/inet_pton.3

index 304aafb1efa2d00030bfa5df798575f1633c788d..f367fc6d2cdba3b3b949d0b1c84904be541f6f06 100644 (file)
@@ -31,7 +31,8 @@ inet_pton \- convert IPv4 and IPv6 addresses from text to binary form
 .nf
 .B #include <arpa/inet.h>
 .PP
-.BI "int inet_pton(int " "af" ", const char *" "src" ", void *" "dst" );
+.BI "int inet_pton(int " af ", const char *restrict " src \
+", void *restrict " dst );
 .fi
 .SH DESCRIPTION
 This function converts the character string