diff mbox

[28/29] tests/qapi: use QEMU_IS_ALIGNED macro

Message ID 20170718061005.29518-29-f4bug@amsat.org
State New
Headers show

Commit Message

Philippe Mathieu-Daudé July 18, 2017, 6:10 a.m. UTC
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/test-qobject-output-visitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marc-André Lureau July 18, 2017, 10:53 a.m. UTC | #1
On Mon, Jul 17, 2017 at 11:10 PM, Philippe Mathieu-Daudé
<f4bug@amsat.org> wrote:
> Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  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 749c54065f..121ee181a0 100644
> --- a/tests/test-qobject-output-visitor.c
> +++ b/tests/test-qobject-output-visitor.c
> @@ -558,7 +558,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.13.2
>
>
diff mbox

Patch

diff --git a/tests/test-qobject-output-visitor.c b/tests/test-qobject-output-visitor.c
index 749c54065f..121ee181a0 100644
--- a/tests/test-qobject-output-visitor.c
+++ b/tests/test-qobject-output-visitor.c
@@ -558,7 +558,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;
         }