From d40d74a645feea0ad01482da2358804f6574dce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 18 Jul 2017 03:10:05 -0300 Subject: [PATCH] tests/qapi: use ARRAY_SIZE macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev Reviewed-by: Marc-André Lureau --- tests/test-string-output-visitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c index fa4b4ca288..02766c0f65 100644 --- a/tests/test-string-output-visitor.c +++ b/tests/test-string-output-visitor.c @@ -95,7 +95,7 @@ static void test_visitor_out_intList(TestOutputVisitorData *data, Error *err = NULL; char *str; - for (i = 0; i < sizeof(value) / sizeof(value[0]); i++) { + for (i = 0; i < ARRAY_SIZE(value); i++) { *tmp = g_malloc0(sizeof(**tmp)); (*tmp)->value = value[i]; tmp = &(*tmp)->next;