Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.

This commit is contained in:
rodrigc 2015-09-20 20:50:56 +00:00
parent aa990038b1
commit a9a0375d7e
6 changed files with 7 additions and 23 deletions

View File

@ -47,8 +47,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);

View File

@ -46,8 +46,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;

View File

@ -57,12 +57,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:
@ -89,11 +84,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;

View File

@ -52,10 +52,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;

View File

@ -46,8 +46,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);

View File

@ -48,8 +48,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;