aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-04-14 17:59:53 +0200
committerTobias Brunner <tobias@strongswan.org>2011-04-14 18:11:46 +0200
commit3bec23d88c2d1f869818f54b6cbc348fda9634c1 (patch)
tree58c6e56e2345e0d5fa92ec056ef7a6b077fdb41d /src
parent722322992484d65cebb02ea5d5f7f346c0d84063 (diff)
downloadstrongswan-3bec23d88c2d1f869818f54b6cbc348fda9634c1.tar.bz2
strongswan-3bec23d88c2d1f869818f54b6cbc348fda9634c1.tar.xz
pluto: Properly initialize constants.
Diffstat (limited to 'src')
-rw-r--r--src/pluto/demux.c4
-rw-r--r--src/pluto/state.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/pluto/demux.c b/src/pluto/demux.c
index 4bd037315..8d2459eac 100644
--- a/src/pluto/demux.c
+++ b/src/pluto/demux.c
@@ -966,7 +966,9 @@ malloc_md(void)
* - .note = NOTHING_WRONG
* - .encrypted = FALSE
*/
- static const struct msg_digest blank_md;
+ static const struct msg_digest blank_md = {
+ .next = NULL,
+ };
if (md == NULL)
{
diff --git a/src/pluto/state.c b/src/pluto/state.c
index 3639f944d..4b96df611 100644
--- a/src/pluto/state.c
+++ b/src/pluto/state.c
@@ -166,7 +166,10 @@ static struct state **state_hash(const u_char *icookie, const u_char *rcookie,
*/
struct state *new_state(void)
{
- static const struct state blank_state; /* initialized all to zero & NULL */
+ /* initialized all to zero & NULL */
+ static const struct state blank_state = {
+ .st_serialno = 0,
+ };
static so_serial_t next_so = SOS_FIRST;
struct state *st;