Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- 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