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

vga: 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: NRichard Henderson <rth@twiddle.net>
上级 935b3332
......@@ -1621,7 +1621,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
s->line_compare, sr(s, VGA_SEQ_CLOCK_MODE));
#endif
addr1 = (s->start_addr * 4);
bwidth = (width * bits + 7) / 8;
bwidth = DIV_ROUND_UP(width * bits, 8);
y_start = -1;
d = surface_data(surface);
linesize = surface_stride(surface);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册