Message ID | 20170713163219.9024-14-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
On 07/13/2017 06:32 AM, Marc-André Lureau wrote: > 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> > --- > hw/display/vga.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson <rth@twiddle.net> r~
diff --git a/hw/display/vga.c b/hw/display/vga.c index 80508b83f4..286295272c 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -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);
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> --- hw/display/vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)