Fix build with gcc.

This commit is contained in:
Alexander V. Chernikov 2014-10-04 13:57:14 +00:00
parent e530ca7333
commit d4e1b51578
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/ipfw/; revision=272521
3 changed files with 9 additions and 6 deletions

View File

@ -556,6 +556,7 @@ add_table_entry(struct ip_fw_chain *ch, struct tid_info *ti,
caddr_t ta_buf_m, v;
memset(&ts, 0, sizeof(ts));
ta = NULL;
IPFW_UH_WLOCK(ch);
/*

View File

@ -45,6 +45,7 @@ __FBSDID("$FreeBSD: projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c 267384 2014-06-
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/rwlock.h>
#include <sys/rmlock.h>
#include <sys/socket.h>
#include <sys/queue.h>
#include <net/if.h> /* ip_fw.h requires IFNAMSIZ */
@ -1819,11 +1820,11 @@ static void if_notifier(struct ip_fw_chain *ch, void *cbdata, uint16_t ifindex);
int
compare_ifidx(const void *k, const void *v)
{
struct ifidx *ifidx;
const struct ifidx *ifidx;
uint16_t key;
key = *((uint16_t *)k);
ifidx = (struct ifidx *)v;
key = *((const uint16_t *)k);
ifidx = (const struct ifidx *)v;
if (key < ifidx->kidx)
return (-1);
@ -2484,11 +2485,11 @@ int compare_numarray(const void *k, const void *v);
int
compare_numarray(const void *k, const void *v)
{
struct numarray *na;
const struct numarray *na;
uint32_t key;
key = *((uint32_t *)k);
na = (struct numarray *)v;
key = *((const uint32_t *)k);
na = (const struct numarray *)v;
if (key < na->number)
return (-1);

View File

@ -490,6 +490,7 @@ ipfw_link_table_values(struct ip_fw_chain *ch, struct tableop_state *ts)
error = 0;
found = 0;
vlimit = ts->ta->vlimit;
vidx = 0;
tc = ts->tc;
tei = ts->tei;
count = ts->count;