[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro |
Date: |
Tue, 21 Aug 2018 14:05:40 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/round.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/vnc-enc-tight.c | 2 +-
ui/vnc.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index f38aceb4da..0b4a5ac71f 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -979,7 +979,7 @@ static int send_mono_rect(VncState *vs, int x, int y,
}
#endif
- bytes = (DIV_ROUND_UP(w, 8)) * h;
+ bytes = DIV_ROUND_UP(w, 8) * h;
vnc_write_u8(vs, (stream | VNC_TIGHT_EXPLICIT_FILTER) << 4);
vnc_write_u8(vs, VNC_TIGHT_FILTER_PALETTE);
diff --git a/ui/vnc.c b/ui/vnc.c
index fd929b0957..ccb1335d86 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2967,7 +2967,8 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb));
guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb);
guest_stride = pixman_image_get_stride(vd->guest.fb);
- guest_ll = pixman_image_get_width(vd->guest.fb) *
(DIV_ROUND_UP(guest_bpp, 8));
+ guest_ll = pixman_image_get_width(vd->guest.fb)
+ * DIV_ROUND_UP(guest_bpp, 8);
}
line_bytes = MIN(server_stride, guest_ll);
--
2.9.3
- [Qemu-devel] [PULL 00/12] Ui 20180821 v2 patches, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 05/12] doc: switch to modern syntax for VNC TLS setup, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 06/12] vnc: remove support for deprecated tls, x509, x509verify options, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 12/12] util: promote qemu_egl_rendernode_open() to libqemuutil, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 07/12] spice-display: access ptr_x/ptr_y under Mutex, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 08/12] spice-display: fix qemu_spice_cursor_refresh_bh locking, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 03/12] ui: use enum to string helpers, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 01/12] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 04/12] sdl2: redraw correctly when scanout_mode enabled., Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 11/12] dmabuf: add y0_top, pass it to spice, Gerd Hoffmann, 2018/08/21
- [Qemu-devel] [PULL 02/12] vnc: fix memleak of the "vnc-worker-output" name, Gerd Hoffmann, 2018/08/21
- Re: [Qemu-devel] [PULL 00/12] Ui 20180821 v2 patches, Peter Maydell, 2018/08/23