aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorRobert Drehmel <robert@FreeBSD.org>2002-08-14 20:40:35 +0000
committerRobert Drehmel <robert@FreeBSD.org>2002-08-14 20:40:35 +0000
commitb7dbaf7b46e3801e05050872619180ac60c7126a (patch)
treef8ad2c443a1f3613a98bf4e10404aa3616e72d33 /lib/libc/net
parent0054a46d1da472a8c044dcb4449842b9ae7f44c2 (diff)
Notes
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/inet.34
-rw-r--r--lib/libc/net/inet_ntop.c17
-rw-r--r--lib/libc/net/inet_pton.c13
3 files changed, 9 insertions, 25 deletions
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3
index ff603fdc6937..c3208772ffab 100644
--- a/lib/libc/net/inet.3
+++ b/lib/libc/net/inet.3
@@ -62,9 +62,9 @@
.Ft char *
.Fn inet_ntoa "struct in_addr in"
.Ft const char *
-.Fn inet_ntop "int af" "const void *src" "char *dst" "socklen_t size"
+.Fn inet_ntop "int af" "const void *restrict src" "char *restrict dst" "socklen_t size"
.Ft int
-.Fn inet_pton "int af" "const char *src" "void *dst"
+.Fn inet_pton "int af" "const char *restrict src" "void *restrict dst"
.Ft struct in_addr
.Fn inet_makeaddr "in_addr_t net" "in_addr_t lna"
.Ft in_addr_t
diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c
index 2a84662567e7..534c968c5bad 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
diff --git a/lib/libc/net/inet_pton.c b/lib/libc/net/inet_pton.c
index 05bb1f4b257c..b29e3e231aa9 100644
--- a/lib/libc/net/inet_pton.c
+++ b/lib/libc/net/inet_pton.c
@@ -48,10 +48,7 @@ static int inet_pton6(const char *src, u_char *dst);
* Paul Vixie, 1996.
*/
int
-inet_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
+inet_pton(int af, const char *__restrict src, void *__restrict dst)
{
switch (af) {
case AF_INET:
@@ -76,9 +73,7 @@ inet_pton(af, src, dst)
* Paul Vixie, 1996.
*/
static int
-inet_pton4(src, dst)
- const char *src;
- u_char *dst;
+inet_pton4(const char *src, u_char *dst)
{
static const char digits[] = "0123456789";
int saw_digit, octets, ch;
@@ -130,9 +125,7 @@ inet_pton4(src, dst)
* Paul Vixie, 1996.
*/
static int
-inet_pton6(src, dst)
- const char *src;
- u_char *dst;
+inet_pton6(const char *src, u_char *dst)
{
static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";