提交 d1a0945f 编写于 作者: M Marc-André Lureau

console: use DIV_ROUND_UP

I used the clang-tidy qemu-round check to generate the fix:
https://github.com/elmarco/clang-tools-extraSigned-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: NRichard Henderson <rth@twiddle.net>
上级 69db8dfc
......@@ -328,7 +328,7 @@ static inline int surface_bits_per_pixel(DisplaySurface *s)
static inline int surface_bytes_per_pixel(DisplaySurface *s)
{
int bits = PIXMAN_FORMAT_BPP(s->format);
return (bits + 7) / 8;
return DIV_ROUND_UP(bits, 8);
}
static inline pixman_format_code_t surface_format(DisplaySurface *s)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册