summaryrefslogtreecommitdiffstats
path: root/freebsd/lib/libc/inet
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/lib/libc/inet')
-rw-r--r--freebsd/lib/libc/inet/inet_addr.c1
-rw-r--r--freebsd/lib/libc/inet/inet_lnaof.c3
-rw-r--r--freebsd/lib/libc/inet/inet_makeaddr.c3
-rw-r--r--freebsd/lib/libc/inet/inet_net_ntop.c13
-rw-r--r--freebsd/lib/libc/inet/inet_neta.c5
-rw-r--r--freebsd/lib/libc/inet/inet_netof.c3
-rw-r--r--freebsd/lib/libc/inet/inet_network.c3
-rw-r--r--freebsd/lib/libc/inet/inet_ntop.c7
-rw-r--r--freebsd/lib/libc/inet/inet_pton.c1
-rw-r--r--freebsd/lib/libc/inet/nsap_addr.c1
10 files changed, 11 insertions, 29 deletions
diff --git a/freebsd/lib/libc/inet/inet_addr.c b/freebsd/lib/libc/inet/inet_addr.c
index e0980f6c..3df3b0c0 100644
--- a/freebsd/lib/libc/inet/inet_addr.c
+++ b/freebsd/lib/libc/inet/inet_addr.c
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <rtems/bsd/sys/param.h>
#include <netinet/in.h>
diff --git a/freebsd/lib/libc/inet/inet_lnaof.c b/freebsd/lib/libc/inet/inet_lnaof.c
index 13699bed..868570bf 100644
--- a/freebsd/lib/libc/inet/inet_lnaof.c
+++ b/freebsd/lib/libc/inet/inet_lnaof.c
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
* number formats.
*/
in_addr_t
-inet_lnaof(in)
- struct in_addr in;
+inet_lnaof(struct in_addr in)
{
in_addr_t i = ntohl(in.s_addr);
diff --git a/freebsd/lib/libc/inet/inet_makeaddr.c b/freebsd/lib/libc/inet/inet_makeaddr.c
index 8c60363d..f2637342 100644
--- a/freebsd/lib/libc/inet/inet_makeaddr.c
+++ b/freebsd/lib/libc/inet/inet_makeaddr.c
@@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
* building addresses stored in the ifnet structure.
*/
struct in_addr
-inet_makeaddr(net, host)
- in_addr_t net, host;
+inet_makeaddr(in_addr_t net, in_addr_t host)
{
struct in_addr a;
diff --git a/freebsd/lib/libc/inet/inet_net_ntop.c b/freebsd/lib/libc/inet/inet_net_ntop.c
index 49e20fb8..31c04aba 100644
--- a/freebsd/lib/libc/inet/inet_net_ntop.c
+++ b/freebsd/lib/libc/inet/inet_net_ntop.c
@@ -59,12 +59,7 @@ static char * inet_net_ntop_ipv6(const u_char *src, int bits, char *dst,
* Paul Vixie (ISC), July 1996
*/
char *
-inet_net_ntop(af, src, bits, dst, size)
- int af;
- const void *src;
- int bits;
- char *dst;
- size_t size;
+inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
{
switch (af) {
case AF_INET:
@@ -91,11 +86,7 @@ inet_net_ntop(af, src, bits, dst, size)
* Paul Vixie (ISC), July 1996
*/
static char *
-inet_net_ntop_ipv4(src, bits, dst, size)
- const u_char *src;
- int bits;
- char *dst;
- size_t size;
+inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
{
char *odst = dst;
char *t;
diff --git a/freebsd/lib/libc/inet/inet_neta.c b/freebsd/lib/libc/inet/inet_neta.c
index 14b75c18..2cab5934 100644
--- a/freebsd/lib/libc/inet/inet_neta.c
+++ b/freebsd/lib/libc/inet/inet_neta.c
@@ -54,10 +54,7 @@ __FBSDID("$FreeBSD$");
* Paul Vixie (ISC), July 1996
*/
char *
-inet_neta(src, dst, size)
- in_addr_t src;
- char *dst;
- size_t size;
+inet_neta(in_addr_t src, char *dst, size_t size)
{
char *odst = dst;
char *tp;
diff --git a/freebsd/lib/libc/inet/inet_netof.c b/freebsd/lib/libc/inet/inet_netof.c
index b782395e..6dda5b1b 100644
--- a/freebsd/lib/libc/inet/inet_netof.c
+++ b/freebsd/lib/libc/inet/inet_netof.c
@@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
* address; handles class a/b/c network #'s.
*/
in_addr_t
-inet_netof(in)
- struct in_addr in;
+inet_netof(struct in_addr in)
{
in_addr_t i = ntohl(in.s_addr);
diff --git a/freebsd/lib/libc/inet/inet_network.c b/freebsd/lib/libc/inet/inet_network.c
index 88a760c4..3c087ec4 100644
--- a/freebsd/lib/libc/inet/inet_network.c
+++ b/freebsd/lib/libc/inet/inet_network.c
@@ -50,8 +50,7 @@ __FBSDID("$FreeBSD$");
* network numbers.
*/
in_addr_t
-inet_network(cp)
- const char *cp;
+inet_network(const char *cp)
{
in_addr_t val, base, n;
char c;
diff --git a/freebsd/lib/libc/inet/inet_ntop.c b/freebsd/lib/libc/inet/inet_ntop.c
index 5cd6a7e0..a3f49d2f 100644
--- a/freebsd/lib/libc/inet/inet_ntop.c
+++ b/freebsd/lib/libc/inet/inet_ntop.c
@@ -26,7 +26,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
#include <rtems/bsd/sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -47,7 +46,7 @@ __FBSDID("$FreeBSD$");
static const char *inet_ntop4(const u_char *src, char *dst, socklen_t size);
static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size);
-/* char *
+/* const char *
* inet_ntop(af, src, dst, size)
* convert a network format address to presentation format.
* return:
@@ -171,8 +170,10 @@ inet_ntop6(const u_char *src, char *dst, socklen_t size)
if (i == 6 && best.base == 0 && (best.len == 6 ||
(best.len == 7 && words[7] != 0x0001) ||
(best.len == 5 && words[5] == 0xffff))) {
- if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
+ if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp))) {
+ errno = ENOSPC;
return (NULL);
+ }
tp += strlen(tp);
break;
}
diff --git a/freebsd/lib/libc/inet/inet_pton.c b/freebsd/lib/libc/inet/inet_pton.c
index 738b9b50..605076e5 100644
--- a/freebsd/lib/libc/inet/inet_pton.c
+++ b/freebsd/lib/libc/inet/inet_pton.c
@@ -25,7 +25,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
#include <rtems/bsd/sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/freebsd/lib/libc/inet/nsap_addr.c b/freebsd/lib/libc/inet/nsap_addr.c
index 5489f983..e46d8848 100644
--- a/freebsd/lib/libc/inet/nsap_addr.c
+++ b/freebsd/lib/libc/inet/nsap_addr.c
@@ -25,7 +25,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <rtems/bsd/sys/param.h>
#include <sys/socket.h>