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:
Marc-André Lureau 2017-06-22 13:04:16 +02:00
parent 935b3332f5
commit 2c23ce22c6
1 changed files with 1 additions and 1 deletions

View File

@ -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);