From b680a194bf9ed4c6470f07da1d88421e643b8a63 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 22 Oct 2014 13:39:51 +0200 Subject: sd-bus: assert clock_gettime()'s return value Don't handle clock_gettime() errors gracefully but use assert_se(). --- src/libsystemd/sd-bus/bus-kernel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/libsystemd/sd-bus/bus-kernel.c') 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; } -- cgit v1.2.3-54-g00ecf