Message ID | 7b997903c784649c128fdc97dda26b0072201b4e.1465112552.git.mjt@msgid.tls.msk.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/ui/spice-display.c b/ui/spice-display.c index 0553c5e..34095fb 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -197,7 +197,7 @@ static void qemu_spice_create_one_update(SimpleSpiceDisplay *ssd, static void qemu_spice_create_update(SimpleSpiceDisplay *ssd) { static const int blksize = 32; - int blocks = (surface_width(ssd->ds) + blksize - 1) / blksize; + int blocks = DIV_ROUND_UP(surface_width(ssd->ds), blksize); int dirty_top[blocks]; int y, yoff1, yoff2, x, xoff, blk, bw; int bpp = surface_bytes_per_pixel(ssd->ds);