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/resolve/resolved-dns-transaction.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/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 487b2c5162..53779f3372 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -372,9 +372,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) { } } - r = sd_event_now(t->scope->manager->event, clock_boottime_or_monotonic(), &ts); - if (r < 0) - ts = now(clock_boottime_or_monotonic()); + assert_se(sd_event_now(t->scope->manager->event, clock_boottime_or_monotonic(), &ts) >= 0); switch (t->scope->protocol) { case DNS_PROTOCOL_DNS: @@ -602,9 +600,7 @@ int dns_transaction_go(DnsTransaction *t) { return 0; } - r = sd_event_now(t->scope->manager->event, clock_boottime_or_monotonic(), &ts); - if (r < 0) - ts = now(clock_boottime_or_monotonic()); + assert_se(sd_event_now(t->scope->manager->event, clock_boottime_or_monotonic(), &ts) >= 0); t->n_attempts++; t->start_usec = ts; |