From c099d9bae1b45a9c6ab89046895ba05e506de843 Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 4 Feb 2025 21:14:30 -0500 Subject: [PATCH] undo as i should've guessed initially, this had nothing to do with the earlier issues i noticed which seemed to disappear once i started fiddling with this function. that appeared to be coincidence. the actual issue lies somewhere else it seems ... ugh --- src/utilities.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; } /**