mirror of https://github.com/xemu-project/xemu.git
vga: use DIV_ROUND_UP
I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
935b3332f5
commit
2c23ce22c6
|
@ -1621,7 +1621,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
||||||
s->line_compare, sr(s, VGA_SEQ_CLOCK_MODE));
|
s->line_compare, sr(s, VGA_SEQ_CLOCK_MODE));
|
||||||
#endif
|
#endif
|
||||||
addr1 = (s->start_addr * 4);
|
addr1 = (s->start_addr * 4);
|
||||||
bwidth = (width * bits + 7) / 8;
|
bwidth = DIV_ROUND_UP(width * bits, 8);
|
||||||
y_start = -1;
|
y_start = -1;
|
||||||
d = surface_data(surface);
|
d = surface_data(surface);
|
||||||
linesize = surface_stride(surface);
|
linesize = surface_stride(surface);
|
||||||
|
|
Loading…
Reference in New Issue