OSDN Git Service

ui: use QEMU_IS_ALIGNED macro
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 18 Jul 2017 06:09:44 +0000 (03:09 -0300)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Nov 2017 13:27:29 +0000 (14:27 +0100)
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170718061005.29518-9-f4bug@amsat.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/console-gl.c

index 5b77e7a..a56e1cd 100644 (file)
@@ -48,7 +48,7 @@ void surface_gl_create_texture(QemuGLShader *gls,
                                DisplaySurface *surface)
 {
     assert(gls);
-    assert(surface_stride(surface) % surface_bytes_per_pixel(surface) == 0);
+    assert(QEMU_IS_ALIGNED(surface_stride(surface), surface_bytes_per_pixel(surface)));
 
     switch (surface->format) {
     case PIXMAN_BE_b8g8r8x8: