From 935b3332f5df80f8adf7c6965ef799185eccc825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 22 Jun 2017 13:04:16 +0200 Subject: ui: use DIV_ROUND_UP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- ui/cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/cursor.c') diff --git a/ui/cursor.c b/ui/cursor.c index 5155b392e8..2e2fe13fa6 100644 --- a/ui/cursor.c +++ b/ui/cursor.c @@ -118,7 +118,7 @@ void cursor_put(QEMUCursor *c) int cursor_get_mono_bpl(QEMUCursor *c) { - return (c->width + 7) / 8; + return DIV_ROUND_UP(c->width, 8); } void cursor_set_mono(QEMUCursor *c, -- cgit v1.2.1