qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 16/17] tests/qapi: use QEMU_IS_ALIGNED macro


From: Michael Tokarev
Subject: [Qemu-devel] [PULL 16/17] tests/qapi: use QEMU_IS_ALIGNED macro
Date: Sat, 10 Feb 2018 10:55:11 +0300

From: Philippe Mathieu-Daudé <address@hidden>

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

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
---
 tests/test-qobject-output-visitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-qobject-output-visitor.c 
b/tests/test-qobject-output-visitor.c
index 3cf942414c..11e8c5aa40 100644
--- a/tests/test-qobject-output-visitor.c
+++ b/tests/test-qobject-output-visitor.c
@@ -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;
         }
-- 
2.11.0




reply via email to

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