aboutsummaryrefslogtreecommitdiff
path: root/tests/test-clone-visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-clone-visitor.c')
-rw-r--r--tests/test-clone-visitor.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/test-clone-visitor.c b/tests/test-clone-visitor.c
index 5e1e8b2f5e..4944b3d857 100644
--- a/tests/test-clone-visitor.c
+++ b/tests/test-clone-visitor.c
@@ -65,16 +65,13 @@ static void test_clone_alternate(void)
static void test_clone_list_union(void)
{
- uint8List *src, *dst;
+ uint8List *src = NULL, *dst;
uint8List *tmp = NULL;
int i;
/* Build list in reverse */
for (i = 10; i; i--) {
- src = g_new0(uint8List, 1);
- src->next = tmp;
- src->value = i;
- tmp = src;
+ QAPI_LIST_PREPEND(src, i);
}
dst = QAPI_CLONE(uint8List, src);