Initialize state_valid and arraysize variable so gcc won't complain.
Reported by: bz
This commit is contained in:
parent
4b861b1569
commit
3b02c4a3d3
@ -906,6 +906,9 @@ key_allocsa_policy(const struct secasindex *saidx)
|
|||||||
u_int stateidx, arraysize;
|
u_int stateidx, arraysize;
|
||||||
const u_int *state_valid;
|
const u_int *state_valid;
|
||||||
|
|
||||||
|
state_valid = NULL; /* silent gcc */
|
||||||
|
arraysize = 0; /* silent gcc */
|
||||||
|
|
||||||
SAHTREE_LOCK();
|
SAHTREE_LOCK();
|
||||||
LIST_FOREACH(sah, &V_sahtree, chain) {
|
LIST_FOREACH(sah, &V_sahtree, chain) {
|
||||||
if (sah->state == SADB_SASTATE_DEAD)
|
if (sah->state == SADB_SASTATE_DEAD)
|
||||||
@ -922,7 +925,6 @@ key_allocsa_policy(const struct secasindex *saidx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SAHTREE_UNLOCK();
|
SAHTREE_UNLOCK();
|
||||||
|
|
||||||
if (sah == NULL)
|
if (sah == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user