chiark / gitweb /
sd-bus: if we don't manage to properly allocate the error message for an sd_bus_error...
[elogind.git] / src / libsystemd / sd-bus / bus-kernel.c
index 136c90fc6304a6597ed17407a87511d328a0c9d5..c23065edfeb397b1ba8ab9c7422132aece9b060a 100644 (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;
         }