From: Andre Noll Date: Fri, 6 Jan 2017 00:03:29 +0000 (+0100) Subject: wma_afh.c: Use DIV_ROUND_UP(). X-Git-Tag: v0.6.0~8^2~4 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=980c9c0455e7d4c32477d076ca3d9152450d4e0f wma_afh.c: Use DIV_ROUND_UP(). This kills another open-coded instance of DIV_ROUND_UP(). --- 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) {