[systemd-commits] src/libsystemd

Daniel Mack zonque at kemper.freedesktop.org
Wed Oct 22 04:43:40 PDT 2014


 src/libsystemd/sd-bus/bus-kernel.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit b680a194bf9ed4c6470f07da1d88421e643b8a63
Author: Daniel Mack <daniel at zonque.org>
Date:   Wed Oct 22 13:39:51 2014 +0200

    sd-bus: assert clock_gettime()'s return value
    
    Don't handle clock_gettime() errors gracefully but use assert_se().

diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 136c90f..c23065e 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;
         }



More information about the systemd-commits mailing list