提交 d40d74a6 编写于 作者: P Philippe Mathieu-Daudé 提交者: Michael Tokarev

tests/qapi: use ARRAY_SIZE macro

Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
上级 9a6555e2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册