From 980c9c0455e7d4c32477d076ca3d9152450d4e0f Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 6 Jan 2017 01:03:29 +0100 Subject: [PATCH] wma_afh.c: Use DIV_ROUND_UP(). This kills another open-coded instance of DIV_ROUND_UP(). --- wma_afh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wma_afh.c b/wma_afh.c index 4c9d87e0..af9ead7c 100644 --- a/wma_afh.c +++ b/wma_afh.c @@ -68,7 +68,7 @@ static int put_utf8(uint32_t val, char *result) *out++ = in; return 1; } - bytes = (wma_log2(in) + 4) / 5; + bytes = DIV_ROUND_UP(wma_log2(in), 5); shift = (bytes - 1) * 6; *out++ = (256 - (256 >> bytes)) | (in >> shift); while (shift >= 6) { -- 2.39.2