summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-22 13:04:16 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-08-31 12:29:07 +0200
commit935b3332f5df80f8adf7c6965ef799185eccc825 (patch)
treec0645ecc170385a92e10c20281461b81653292cf
parent659c90eed8f2667febc1fd1f6473799ab6a45fb6 (diff)
downloadfocaccia-qemu-935b3332f5df80f8adf7c6965ef799185eccc825.tar.gz
focaccia-qemu-935b3332f5df80f8adf7c6965ef799185eccc825.zip
ui: 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: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
-rw-r--r--ui/cursor.c2
1 files changed, 1 insertions, 1 deletions
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,