Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
This commit is contained in:
parent
aa990038b1
commit
a9a0375d7e
@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
* number formats.
|
* number formats.
|
||||||
*/
|
*/
|
||||||
in_addr_t
|
in_addr_t
|
||||||
inet_lnaof(in)
|
inet_lnaof(struct in_addr in)
|
||||||
struct in_addr in;
|
|
||||||
{
|
{
|
||||||
in_addr_t i = ntohl(in.s_addr);
|
in_addr_t i = ntohl(in.s_addr);
|
||||||
|
|
||||||
|
@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
* building addresses stored in the ifnet structure.
|
* building addresses stored in the ifnet structure.
|
||||||
*/
|
*/
|
||||||
struct in_addr
|
struct in_addr
|
||||||
inet_makeaddr(net, host)
|
inet_makeaddr(in_addr_t net, in_addr_t host)
|
||||||
in_addr_t net, host;
|
|
||||||
{
|
{
|
||||||
struct in_addr a;
|
struct in_addr a;
|
||||||
|
|
||||||
|
@ -57,12 +57,7 @@ static char * inet_net_ntop_ipv6(const u_char *src, int bits, char *dst,
|
|||||||
* Paul Vixie (ISC), July 1996
|
* Paul Vixie (ISC), July 1996
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
inet_net_ntop(af, src, bits, dst, size)
|
inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
|
||||||
int af;
|
|
||||||
const void *src;
|
|
||||||
int bits;
|
|
||||||
char *dst;
|
|
||||||
size_t size;
|
|
||||||
{
|
{
|
||||||
switch (af) {
|
switch (af) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
@ -89,11 +84,7 @@ inet_net_ntop(af, src, bits, dst, size)
|
|||||||
* Paul Vixie (ISC), July 1996
|
* Paul Vixie (ISC), July 1996
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
inet_net_ntop_ipv4(src, bits, dst, size)
|
inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
|
||||||
const u_char *src;
|
|
||||||
int bits;
|
|
||||||
char *dst;
|
|
||||||
size_t size;
|
|
||||||
{
|
{
|
||||||
char *odst = dst;
|
char *odst = dst;
|
||||||
char *t;
|
char *t;
|
||||||
|
@ -52,10 +52,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
* Paul Vixie (ISC), July 1996
|
* Paul Vixie (ISC), July 1996
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
inet_neta(src, dst, size)
|
inet_neta(in_addr_t src, char *dst, size_t size)
|
||||||
in_addr_t src;
|
|
||||||
char *dst;
|
|
||||||
size_t size;
|
|
||||||
{
|
{
|
||||||
char *odst = dst;
|
char *odst = dst;
|
||||||
char *tp;
|
char *tp;
|
||||||
|
@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
* address; handles class a/b/c network #'s.
|
* address; handles class a/b/c network #'s.
|
||||||
*/
|
*/
|
||||||
in_addr_t
|
in_addr_t
|
||||||
inet_netof(in)
|
inet_netof(struct in_addr in)
|
||||||
struct in_addr in;
|
|
||||||
{
|
{
|
||||||
in_addr_t i = ntohl(in.s_addr);
|
in_addr_t i = ntohl(in.s_addr);
|
||||||
|
|
||||||
|
@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
* network numbers.
|
* network numbers.
|
||||||
*/
|
*/
|
||||||
in_addr_t
|
in_addr_t
|
||||||
inet_network(cp)
|
inet_network(const char *cp)
|
||||||
const char *cp;
|
|
||||||
{
|
{
|
||||||
in_addr_t val, base, n;
|
in_addr_t val, base, n;
|
||||||
char c;
|
char c;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user