diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2017-07-18 03:10:05 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2018-02-10 10:45:14 +0300 |
commit | d40d74a645feea0ad01482da2358804f6574dce0 (patch) | |
tree | df87fc0f0347d91b8787a84563dd63242c4a1d59 /tests | |
parent | 9a6555e21a80498aeac28d3276bbde61ddb30c05 (diff) | |
download | qemu-d40d74a645feea0ad01482da2358804f6574dce0.zip qemu-d40d74a645feea0ad01482da2358804f6574dce0.tar.gz qemu-d40d74a645feea0ad01482da2358804f6574dce0.tar.bz2 |
tests/qapi: use ARRAY_SIZE macro
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-string-output-visitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c index fa4b4ca..02766c0 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; |