summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-10-22 13:39:51 +0200
committerDaniel Mack <daniel@zonque.org>2014-10-22 13:39:51 +0200
commitb680a194bf9ed4c6470f07da1d88421e643b8a63 (patch)
treef753d957c496c0dc302f3d43ba488fa194974459 /src/libsystemd/sd-bus
parentb857e042d621ffb98a652f33850b431fafbece43 (diff)
sd-bus: assert clock_gettime()'s return value
Don't handle clock_gettime() errors gracefully but use assert_se().
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 136c90fc63..c23065edfe 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -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;
}