]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: use usec_add()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Jun 2021 16:01:48 +0000 (01:01 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Jun 2021 16:01:48 +0000 (01:01 +0900)
src/libsystemd/sd-event/sd-event.c

index e6744989ffd9677d1d8797bda6256ead032cd4d7..b2c2074e81720dddd7fc5cf3836e94eeee448f83 100644 (file)
@@ -3677,8 +3677,8 @@ static int arm_watchdog(sd_event *e) {
         assert(e->watchdog_fd >= 0);
 
         t = sleep_between(e,
-                          e->watchdog_last + (e->watchdog_period / 2),
-                          e->watchdog_last + (e->watchdog_period * 3 / 4));
+                          usec_add(e->watchdog_last, (e->watchdog_period / 2)),
+                          usec_add(e->watchdog_last, (e->watchdog_period * 3 / 4)));
 
         timespec_store(&its.it_value, t);