[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 12/29] ui: use DIV_ROUND_UP
From: |
Marc-André Lureau |
Subject: |
[Qemu-trivial] [PULL 12/29] ui: use DIV_ROUND_UP |
Date: |
Thu, 31 Aug 2017 12:34:15 +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 <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
ui/cursor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
--
2.14.1.146.gd35faa819
- [Qemu-trivial] [PULL 02/29] vnc: use QEMU_ALIGN_DOWN, (continued)
- [Qemu-trivial] [PULL 02/29] vnc: use QEMU_ALIGN_DOWN, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 03/29] vhdx: use QEMU_ALIGN_DOWN, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 04/29] vhost: use QEMU_ALIGN_DOWN, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 05/29] i8254: use QEMU_ALIGN_DOWN, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 06/29] pcspk: use QEMU_ALIGN_DOWN, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 07/29] dmg: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 10/29] vvfat: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 08/29] qcow2: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 11/29] vnc: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 09/29] vpc: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 12/29] ui: use DIV_ROUND_UP,
Marc-André Lureau <=
- [Qemu-trivial] [PULL 13/29] vga: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 14/29] virtio-gpu: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 15/29] monitor: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 16/29] console: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 17/29] virtio-serial: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 18/29] piix: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 19/29] q35: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 20/29] usb-hub: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 21/29] msix: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31
- [Qemu-trivial] [PULL 22/29] ppc: use DIV_ROUND_UP, Marc-André Lureau, 2017/08/31