qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/29] sm501: use QEMU_IS_ALIGNED macro


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH 12/29] sm501: use QEMU_IS_ALIGNED macro
Date: Tue, 18 Jul 2017 03:09:48 -0300

Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 hw/display/sm501_template.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/sm501_template.h b/hw/display/sm501_template.h
index a60abad019..6b6386bc72 100644
--- a/hw/display/sm501_template.h
+++ b/hw/display/sm501_template.h
@@ -105,7 +105,7 @@ static void glue(draw_hwc_line_, PIXEL_NAME)(uint8_t *d, 
const uint8_t *s,
 
     for (i = 0; i < SM501_HWC_WIDTH && c_x + i < width; i++) {
         /* get pixel value */
-        if (i % 4 == 0) {
+        if (QEMU_IS_ALIGNED(i, 4)) {
             bitset = ldub_p(s);
             s++;
         }
-- 
2.13.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]