diff --git a/src/utilities.c b/src/utilities.c index 1e22422..f1b7fb7 100644 --- a/src/utilities.c +++ b/src/utilities.c @@ -15,11 +15,7 @@ * @return the smallest short c such that c >= a / b */ short ceil_div_short(short a, short b) { - if (a % b) { - return (a / b) + 1; - } else { - return a / b; - } + return (a + (b - 1)) / b; } /**