[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v2 5/7] ui/vnc: Remove useless parenthesis around
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH v2 5/7] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro |
Date: |
Thu, 5 Jul 2018 12:58:09 -0300 |
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>
Reviewed-by: Markus Armbruster <address@hidden>
Acked-by: Michael S. Tsirkin <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 359693238b..3361432a51 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.18.0
- [Qemu-trivial] [PATCH v2 0/7] Coccinelle cleanups, Philippe Mathieu-Daudé, 2018/07/05
- [Qemu-trivial] [PATCH v2 1/7] qobject: Catch another straggler for use of qdict_put_str(), Philippe Mathieu-Daudé, 2018/07/05
- [Qemu-trivial] [PATCH v2 2/7] error: Remove NULL checks on error_propagate() calls, Philippe Mathieu-Daudé, 2018/07/05
- [Qemu-trivial] [PATCH v2 3/7] xen: Use the PCI_DEVICE macro, Philippe Mathieu-Daudé, 2018/07/05
- [Qemu-trivial] [PATCH v2 4/7] tests/bios-tables-test: Remove an useless cast, Philippe Mathieu-Daudé, 2018/07/05
- [Qemu-trivial] [PATCH v2 5/7] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH v2 6/7] hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro, Philippe Mathieu-Daudé, 2018/07/05
- [Qemu-trivial] [PATCH v2 7/7] hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro, Philippe Mathieu-Daudé, 2018/07/05