summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-ipv4ll.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-08-03 17:57:26 +0200
committerTom Gundersen <teg@jklm.no>2015-08-03 17:57:26 +0200
commit6934f402cded89a988e8d7f93bf0b7b4eb8f17f3 (patch)
tree0decd0bdddc5a9be1ea76ce38c756ec85e42ab94 /src/libsystemd-network/sd-ipv4ll.c
parent5ef9b2203e027da168b18d92045462422895565b (diff)
parent38a03f06a7393d2721c23f23f0589d2f6d0904af (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-ipv4ll.c')
-rw-r--r--src/libsystemd-network/sd-ipv4ll.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/sd-ipv4ll.c
index 9e04db96bb..0cb77ccf71 100644
--- a/src/libsystemd-network/sd-ipv4ll.c
+++ b/src/libsystemd-network/sd-ipv4ll.c
@@ -187,8 +187,7 @@ static void ipv4ll_set_next_wakeup(sd_ipv4ll *ll, int sec, int random_sec) {
if (random_sec)
next_timeout += random_u32() % (random_sec * USEC_PER_SEC);
- if (sd_event_now(ll->event, clock_boottime_or_monotonic(), &time_now) < 0)
- time_now = now(clock_boottime_or_monotonic());
+ assert_se(sd_event_now(ll->event, clock_boottime_or_monotonic(), &time_now) >= 0);
ll->next_wakeup = time_now + next_timeout;
ll->next_wakeup_valid = 1;