1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

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

This commit is contained in:
Craig Rodrigues 2015-09-20 21:21:01 +00:00
parent 1d48f121d8
commit 626c9d7433
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288045
9 changed files with 20 additions and 49 deletions

View File

@ -107,10 +107,7 @@ int _dns_ttl_;
#ifdef DEBUG
static void
dprintf(msg, num, res)
char *msg;
int num;
res_state res;
dprintf(char *msg, int num, res_state res)
{
if (res->options & RES_DEBUG) {
int save = errno;
@ -769,7 +766,7 @@ _sethostdnsent(int stayopen)
}
void
_endhostdnsent()
_endhostdnsent(void)
{
res_state statp;

View File

@ -455,7 +455,7 @@ _setnetdnsent(int stayopen)
}
void
_endnetdnsent()
_endnetdnsent(void)
{
res_state statp;

View File

@ -1241,7 +1241,7 @@ setservent(int stayopen)
}
void
endservent()
endservent(void)
{
#ifdef NS_CACHING
static const nss_cache_info cache_info = NS_MP_CACHE_INFO_INITIALIZER(
@ -1362,7 +1362,7 @@ getservbyport(int port, const char *proto)
}
struct servent *
getservent()
getservent(void)
{
struct key key;

View File

@ -50,9 +50,7 @@ __FBSDID("$FreeBSD$");
#define LETTER (4*3)
void
link_addr(addr, sdl)
const char *addr;
struct sockaddr_dl *sdl;
link_addr(const char *addr, struct sockaddr_dl *sdl)
{
char *cp = sdl->sdl_data;
char *cplim = sdl->sdl_len + (char *)sdl;
@ -121,8 +119,7 @@ link_addr(addr, sdl)
static const char hexlist[] = "0123456789abcdef";
char *
link_ntoa(sdl)
const struct sockaddr_dl *sdl;
link_ntoa(const struct sockaddr_dl *sdl)
{
static char obuf[64];
char *out = obuf;

View File

@ -97,14 +97,13 @@ STRING [a-zA-Z][a-zA-Z0-9_]*
#undef _nsyywrap
int
_nsyywrap()
_nsyywrap(void)
{
return 1;
} /* _nsyywrap */
void
_nsyyerror(msg)
const char *msg;
_nsyyerror(const char *msg)
{
syslog(LOG_ERR, "NSSWITCH(nslexer): %s line %d: %s at '%s'",

View File

@ -145,8 +145,7 @@ Action
%%
static void
_nsaddsrctomap(elem)
const char *elem;
_nsaddsrctomap(const char *elem)
{
int i, lineno;
extern int _nsyylineno;

View File

@ -40,10 +40,7 @@ __FBSDID("$FreeBSD$");
#include <stddef.h>
ssize_t
recv(s, buf, len, flags)
int s, flags;
size_t len;
void *buf;
recv(int s, void *buf, size_t len, int flags)
{
/*
* POSIX says recv() shall be a cancellation point, so call the

View File

@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
*/
size_t
inet6_rthdr_space(type, seg)
int type, seg;
inet6_rthdr_space(int type, int seg)
{
switch (type) {
case IPV6_RTHDR_TYPE_0:
@ -67,9 +66,7 @@ inet6_rthdr_space(type, seg)
}
struct cmsghdr *
inet6_rthdr_init(bp, type)
void *bp;
int type;
inet6_rthdr_init(void *bp, int type)
{
struct cmsghdr *ch = (struct cmsghdr *)bp;
struct ip6_rthdr *rthdr;
@ -98,10 +95,7 @@ inet6_rthdr_init(bp, type)
/* ARGSUSED */
int
inet6_rthdr_add(cmsg, addr, flags)
struct cmsghdr *cmsg;
const struct in6_addr *addr;
u_int flags;
inet6_rthdr_add(struct cmsghdr *cmsg, const struct in6_addr *addr, u_int flags)
{
struct ip6_rthdr *rthdr;
@ -143,9 +137,7 @@ inet6_rthdr_add(cmsg, addr, flags)
/* ARGSUSED */
int
inet6_rthdr_lasthop(cmsg, flags)
struct cmsghdr *cmsg;
unsigned int flags;
inet6_rthdr_lasthop(struct cmsghdr *cmsg, unsigned int flags)
{
struct ip6_rthdr *rthdr;
@ -183,9 +175,7 @@ inet6_rthdr_lasthop(cmsg, flags)
#if 0
int
inet6_rthdr_reverse(in, out)
const struct cmsghdr *in;
struct cmsghdr *out;
inet6_rthdr_reverse(const struct cmsghdr *in, struct cmsghdr *out)
{
return (-1);
@ -193,8 +183,7 @@ inet6_rthdr_reverse(in, out)
#endif
int
inet6_rthdr_segments(cmsg)
const struct cmsghdr *cmsg;
inet6_rthdr_segments(const struct cmsghdr *cmsg)
{
struct ip6_rthdr *rthdr;
@ -217,9 +206,7 @@ inet6_rthdr_segments(cmsg)
}
struct in6_addr *
inet6_rthdr_getaddr(cmsg, idx)
struct cmsghdr *cmsg;
int idx;
inet6_rthdr_getaddr(struct cmsghdr *cmsg, int idx)
{
struct ip6_rthdr *rthdr;
@ -249,9 +236,7 @@ inet6_rthdr_getaddr(cmsg, idx)
}
int
inet6_rthdr_getflags(cmsg, idx)
const struct cmsghdr *cmsg;
int idx;
inet6_rthdr_getflags(const struct cmsghdr *cmsg, int idx)
{
struct ip6_rthdr *rthdr;

View File

@ -40,10 +40,7 @@ __FBSDID("$FreeBSD$");
#include <stddef.h>
ssize_t
send(s, msg, len, flags)
int s, flags;
size_t len;
const void *msg;
send(int s, const void *msg, size_t len, int flags)
{
/*
* POSIX says send() shall be a cancellation point, so call the