summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/key.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2009-09-06 18:09:25 +0000
committerpjd <pjd@FreeBSD.org>2009-09-06 18:09:25 +0000
commitfe152cceaff5c45acd2712a5451f81769eb32dff (patch)
tree070e86ddc23236d469caa292542ad756b4de028a /sys/netipsec/key.c
parent673ab1edd52da7b8770060051a1ff58bc33ba29c (diff)
downloadFreeBSD-src-fe152cceaff5c45acd2712a5451f81769eb32dff.zip
FreeBSD-src-fe152cceaff5c45acd2712a5451f81769eb32dff.tar.gz
Initialize state_valid and arraysize variable so gcc won't complain.
Reported by: bz
Diffstat (limited to 'sys/netipsec/key.c')
-rw-r--r--sys/netipsec/key.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index 081e697..8183f5b 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -906,6 +906,9 @@ key_allocsa_policy(const struct secasindex *saidx)
u_int stateidx, arraysize;
const u_int *state_valid;
+ state_valid = NULL; /* silent gcc */
+ arraysize = 0; /* silent gcc */
+
SAHTREE_LOCK();
LIST_FOREACH(sah, &V_sahtree, chain) {
if (sah->state == SADB_SASTATE_DEAD)
@@ -922,7 +925,6 @@ key_allocsa_policy(const struct secasindex *saidx)
}
}
SAHTREE_UNLOCK();
-
if (sah == NULL)
return NULL;
OpenPOWER on IntegriCloud