diff options
author | Tom Gundersen <teg@jklm.no> | 2015-08-03 17:57:26 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-08-03 17:57:26 +0200 |
commit | 6934f402cded89a988e8d7f93bf0b7b4eb8f17f3 (patch) | |
tree | 0decd0bdddc5a9be1ea76ce38c756ec85e42ab94 /src/libsystemd-network/sd-dhcp6-client.c | |
parent | 5ef9b2203e027da168b18d92045462422895565b (diff) | |
parent | 38a03f06a7393d2721c23f23f0589d2f6d0904af (diff) |
Merge pull request #843 from poettering/clock-boottime
sd-event: make sure sd_event_now() cannot fail
Diffstat (limited to 'src/libsystemd-network/sd-dhcp6-client.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-client.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 85162dc555..e2f5862851 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -975,14 +975,9 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state) client->retransmit_time = 0; client->retransmit_count = 0; - if (client->state == DHCP6_STATE_STOPPED) { - time_now = now(clock_boottime_or_monotonic()); - } else { - r = sd_event_now(client->event, clock_boottime_or_monotonic(), - &time_now); - if (r < 0) - return r; - } + r = sd_event_now(client->event, clock_boottime_or_monotonic(), &time_now); + if (r < 0) + return r; switch (state) { case DHCP6_STATE_STOPPED: |