mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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>
This commit is contained in:
parent
9a6555e21a
commit
d40d74a645
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue