diff options
author | robert <robert@FreeBSD.org> | 2002-08-14 20:40:35 +0000 |
---|---|---|
committer | robert <robert@FreeBSD.org> | 2002-08-14 20:40:35 +0000 |
commit | af770662f5873b76efc3233fab18400da9bded1d (patch) | |
tree | f8ad2c443a1f3613a98bf4e10404aa3616e72d33 /lib/libc/net/inet_ntop.c | |
parent | 49bfd93f794015af9f041211138924510d40f89a (diff) | |
download | FreeBSD-src-af770662f5873b76efc3233fab18400da9bded1d.zip FreeBSD-src-af770662f5873b76efc3233fab18400da9bded1d.tar.gz |
-Add the restrict required by IEEE Std 1003.1-2001 in form
of our __restrict macro to the prototypes and function
definitions of inet_pton and inet_ntop.
- Use ANSI-C function argument lists.
- Adjust the prototypes in the manual page.
Diffstat (limited to 'lib/libc/net/inet_ntop.c')
-rw-r--r-- | lib/libc/net/inet_ntop.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c index 2a84662..534c968 100644 --- a/lib/libc/net/inet_ntop.c +++ b/lib/libc/net/inet_ntop.c @@ -49,11 +49,8 @@ static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size); * Paul Vixie, 1996. */ const char * -inet_ntop(af, src, dst, size) - int af; - const void *src; - char *dst; - socklen_t size; +inet_ntop(int af, const void *__restrict src, char *__restrict dst, + socklen_t size) { switch (af) { case AF_INET: @@ -79,10 +76,7 @@ inet_ntop(af, src, dst, size) * Paul Vixie, 1996. */ static const char * -inet_ntop4(src, dst, size) - const u_char *src; - char *dst; - socklen_t size; +inet_ntop4(const u_char *src, char *dst, socklen_t size) { static const char fmt[] = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; @@ -102,10 +96,7 @@ inet_ntop4(src, dst, size) * Paul Vixie, 1996. */ static const char * -inet_ntop6(src, dst, size) - const u_char *src; - char *dst; - socklen_t size; +inet_ntop6(const u_char *src, char *dst, socklen_t size) { /* * Note that int32_t and int16_t need only be "at least" large enough |