1
0
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:
Daniel Mack 2014-10-22 13:39:51 +02:00
parent b857e042d6
commit b680a194bf

View File

@ -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;
}