aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2009-01-28 13:39:01 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2009-01-28 13:39:01 +0000
commit6e152a7539920b4b8077b33a2508ab3a70ffc4ea (patch)
tree6bb5de6077861a975c9c5ef91e2b1d9ded9fb4b5 /sys/netinet
parent36cb0db4766668838d8164b14f2c69c11dabb5bb (diff)
downloadsrc-6e152a7539920b4b8077b33a2508ab3a70ffc4ea.tar.gz
src-6e152a7539920b4b8077b33a2508ab3a70ffc4ea.zip
initialize a couple of variables, gcc 4.2.4-4 (linux) reports
some possible uninitialized uses and the warning does make sense.
Notes
Notes: svn path=/head/; revision=187822
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_fw2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index d77c084aeb67..133166e17b5f 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -2254,6 +2254,7 @@ ipfw_chk(struct ip_fw_args *args)
if (m->m_flags & M_SKIP_FIREWALL)
return (IP_FW_PASS); /* accept */
+ dst_ip.s_addr = 0; /* make sure it is initialized */
pktlen = m->m_pkthdr.len;
args->f_id.fib = M_GETFIB(m); /* note mbuf not altered) */
proto = args->f_id.proto = 0; /* mark f_id invalid */
@@ -2711,7 +2712,7 @@ check_body:
uint32_t a =
(cmd->opcode == O_IP_DST_LOOKUP) ?
dst_ip.s_addr : src_ip.s_addr;
- uint32_t v;
+ uint32_t v = 0;
match = lookup_table(chain, cmd->arg1, a,
&v);