diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-02 15:53:41 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-02 15:54:27 +0200 |
commit | 5e91345094a9e983e7abb2313334e7808bcd2cc2 (patch) | |
tree | 16ef6dd55649d0f8c9da897987d3e740fab2f9e1 /src/libsystemd-network/sd-dhcp6-client.c | |
parent | 01d4590b775661ebc71c7b81b0c62ccd69395268 (diff) |
sd-dhcp6-client: initialize variable
Diffstat (limited to 'src/libsystemd-network/sd-dhcp6-client.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-client.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 1d6e42ec83..8fdbbfe320 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -388,7 +388,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, int r = 0; sd_dhcp6_client *client = userdata; usec_t time_now, init_retransmit_time, max_retransmit_time; - usec_t max_retransmit_duration; + usec_t max_retransmit_duration = 0; uint8_t max_retransmit_count = 0; char time_string[FORMAT_TIMESPAN_MAX]; uint32_t expire = 0; @@ -409,8 +409,6 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, init_retransmit_time = DHCP6_SOL_TIMEOUT; max_retransmit_time = DHCP6_SOL_MAX_RT; - max_retransmit_count = 0; - max_retransmit_duration = 0; break; @@ -418,28 +416,22 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, init_retransmit_time = DHCP6_REQ_TIMEOUT; max_retransmit_time = DHCP6_REQ_MAX_RT; max_retransmit_count = DHCP6_REQ_MAX_RC; - max_retransmit_duration = 0; break; case DHCP6_STATE_RENEW: init_retransmit_time = DHCP6_REN_TIMEOUT; max_retransmit_time = DHCP6_REN_MAX_RT; - max_retransmit_count = 0; /* RFC 3315, section 18.1.3. says max retransmit duration will be the remaining time until T2. Instead of setting MRD, wait for T2 to trigger with the same end result */ - max_retransmit_duration = 0; break; case DHCP6_STATE_REBIND: init_retransmit_time = DHCP6_REB_TIMEOUT; max_retransmit_time = DHCP6_REB_MAX_RT; - max_retransmit_count = 0; - - max_retransmit_duration = 0; if (!client->timeout_resend_expire) { r = dhcp6_lease_ia_rebind_expire(&client->lease->ia, |