kernel-netlink: Fix GCC error about uninitialized variable use
authorMartin Willi <martin@revosec.ch>
Wed, 8 Apr 2015 09:13:04 +0000 (11:13 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 8 Apr 2015 09:13:04 +0000 (11:13 +0200)
get_replay_state() always returns a replay_state_len when returning a
replay state, but GCC doesn't know about that.

src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c

index 03e44e5..f22e07d 100644 (file)
@@ -1822,7 +1822,7 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
        struct xfrm_replay_state *replay = NULL;
        struct xfrm_replay_state_esn *replay_esn = NULL;
        struct xfrm_lifetime_cur *lifetime = NULL;
-       u_int32_t replay_esn_len;
+       u_int32_t replay_esn_len = 0;
        status_t status = FAILED;
 
        /* if IPComp is used, we first update the IPComp SA */