]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/qapi: use QEMU_IS_ALIGNED macro
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 18 Jul 2017 06:10:04 +0000 (03:10 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 10 Feb 2018 07:44:58 +0000 (10:44 +0300)
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
tests/test-qobject-output-visitor.c

index 3cf942414cb5175a64cdc849b9d1f38c517ba994..11e8c5aa403c76ce131cd25d41cab29834eea9a7 100644 (file)
@@ -572,7 +572,7 @@ static void init_native_list(UserDefNativeListUnion *cvalue)
         boolList **list = &cvalue->u.boolean.data;
         for (i = 0; i < 32; i++) {
             *list = g_new0(boolList, 1);
-            (*list)->value = (i % 3 == 0);
+            (*list)->value = QEMU_IS_ALIGNED(i, 3);
             (*list)->next = NULL;
             list = &(*list)->next;
         }