ipf: Use C89 function definitions.

Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D39523
This commit is contained in:
John Baldwin 2023-04-18 11:22:28 -07:00
parent eae7dd0f22
commit 2ac057dd33
8 changed files with 12 additions and 36 deletions

View file

@ -9,10 +9,8 @@
#include "ipf.h"
int genmask(family, msk, mskp)
int family;
char *msk;
i6addr_t *mskp;
int
genmask(int family, char *msk, i6addr_t *mskp)
{
char *endptr = 0L;
u_32_t addr;

View file

@ -603,8 +603,7 @@ yylex(void)
}
static wordtab_t *yyfindkey(key)
char *key;
static wordtab_t *yyfindkey(char *key)
{
wordtab_t *w;

View file

@ -117,9 +117,7 @@ static int m_xhalf(mb_t *, int, int *);
}
static int
m_xword(m, k, err)
register mb_t *m;
register int k, *err;
m_xword(mb_t *m, int k, int *err)
{
register int len;
register u_char *cp, *np;
@ -153,9 +151,7 @@ m_xword(m, k, err)
}
static int
m_xhalf(m, k, err)
register mb_t *m;
register int k, *err;
m_xhalf(mb_t *m, int k, int *err)
{
register int len;
register u_char *cp;
@ -185,11 +181,7 @@ m_xhalf(m, k, err)
* in all other cases, p is a pointer to a buffer and buflen is its size.
*/
u_int
bpf_filter(pc, p, wirelen, buflen)
register struct bpf_insn *pc;
register u_char *p;
u_int wirelen;
register u_int buflen;
bpf_filter(struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen)
{
register u_int32 A, X;
register int k;
@ -478,9 +470,7 @@ bpf_filter(pc, p, wirelen, buflen)
* Otherwise, a bogus program could easily crash the system.
*/
int
bpf_validate(f, len)
struct bpf_insn *f;
int len;
bpf_validate(struct bpf_insn *f, int len)
{
u_int i, from;
const struct bpf_insn *p;

View file

@ -162,8 +162,7 @@ static int sort_dstpt(const void *, const void *);
#endif
static void usage(name)
char *name;
static void usage(char *name)
{
#ifdef USE_INET6
fprintf(stderr, "Usage: %s [-46aAdfghIilnoRsv]\n", name);

View file

@ -470,10 +470,7 @@ read_log(int fd, int *lenp, char *buf, int bufsize)
char *
portlocalname(res, proto, port)
int res;
char *proto;
u_int port;
portlocalname(int res, char *proto, u_int port)
{
static char pname[8];
char *s;

View file

@ -85,10 +85,7 @@ eMmutex_init(eMmutex_t *mtx, char *who, char *file, int line)
void
eMmutex_destroy(mtx, file, line)
eMmutex_t *mtx;
char *file;
int line;
eMmutex_destroy(eMmutex_t *mtx, char *file, int line)
{
if (mutex_debug & 1)
fprintf(mutex_file,

View file

@ -28,10 +28,7 @@ pool_open(void)
}
int
pool_ioctl(iocfunc, cmd, ptr)
ioctlfunc_t iocfunc;
ioctlcmd_t cmd;
void *ptr;
pool_ioctl(ioctlfunc_t iocfunc, ioctlcmd_t cmd, void *ptr)
{
return (*iocfunc)(poolfd, cmd, ptr);
}

View file

@ -24,8 +24,7 @@ static variable_t *find_var(char *);
static char *expand_string(char *, int);
static variable_t *find_var(name)
char *name;
static variable_t *find_var(char *name)
{
variable_t *v;