projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
659c90e
)
ui: use DIV_ROUND_UP
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 22 Jun 2017 11:04:16 +0000
(13:04 +0200)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 31 Aug 2017 10:29:07 +0000
(12:29 +0200)
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>
ui/cursor.c
patch
|
blob
|
history
diff --git
a/ui/cursor.c
b/ui/cursor.c
index 5155b392e86a1646755d482a50713a6f585a38c1..2e2fe13fa692eb9a39b84ca63bb1b370eca5f384 100644
(file)
--- 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,