Commit cf7040e2 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Gerd Hoffmann
Browse files

vmsvga: use ARRAY_SIZE macro



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

Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170718061005.29518-23-f4bug@amsat.org>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 115788d7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -679,10 +679,9 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
            if (cursor.width > 256
                || cursor.height > 256
                || cursor.bpp > 32
                || SVGA_BITMAP_SIZE(x, y)
                    > sizeof(cursor.mask) / sizeof(cursor.mask[0])
                || SVGA_BITMAP_SIZE(x, y) > ARRAY_SIZE(cursor.mask)
                || SVGA_PIXMAP_SIZE(x, y, cursor.bpp)
                    > sizeof(cursor.image) / sizeof(cursor.image[0])) {
                    > ARRAY_SIZE(cursor.image)) {
                    goto badcmd;
            }