mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
sd-bus: assert clock_gettime()'s return value
Don't handle clock_gettime() errors gracefully but use assert_se().
This commit is contained in:
parent
b857e042d6
commit
b680a194bf
@ -275,12 +275,7 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) {
|
||||
} else {
|
||||
struct timespec now;
|
||||
|
||||
r = clock_gettime(CLOCK_MONOTONIC_COARSE, &now);
|
||||
if (r < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
assert_se(clock_gettime(CLOCK_MONOTONIC_COARSE, &now) == 0);
|
||||
m->kdbus->timeout_ns = now.tv_sec * NSEC_PER_SEC + now.tv_nsec +
|
||||
m->timeout * NSEC_PER_USEC;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user