From 5a265e9aca07f4d8e2e6f33dc822e635b0cc36b9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 20 Mar 2018 20:36:09 +0100 Subject: coccinelle: make use of DIV_ROUND_UP() wherever appropriate Let's use our macros where we can --- src/basic/exec-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/basic/exec-util.c') diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c index f8ac40671..73330c278 100644 --- a/src/basic/exec-util.c +++ b/src/basic/exec-util.c @@ -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; -- cgit v1.2.3