]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/exec-util.c
coccinelle: make use of DIV_ROUND_UP() wherever appropriate
[thirdparty/systemd.git] / src / basic / exec-util.c
index e0057a75727279e4bdd679502ac6d87c240835fb..49fb95e382a4d8dda4a1375b415878f828ba4ccf 100644 (file)
@@ -116,7 +116,7 @@ static int do_execute(
          * default action terminating the process, and turn on alarm(). */
 
         if (timeout != USEC_INFINITY)
-                alarm((timeout + USEC_PER_SEC - 1) / USEC_PER_SEC);
+                alarm(DIV_ROUND_UP(timeout, USEC_PER_SEC));
 
         STRV_FOREACH(path, paths) {
                 _cleanup_free_ char *t = NULL;