diff options
Diffstat (limited to 'tests/test-qmp-input-visitor.c')
-rw-r--r-- | tests/test-qmp-input-visitor.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index b236183ec0..f583dce3ed 100644 --- a/tests/test-qmp-input-visitor.c +++ b/tests/test-qmp-input-visitor.c @@ -22,7 +22,7 @@ typedef struct TestInputVisitorData { QObject *obj; - QmpInputVisitor *qiv; + Visitor *qiv; } TestInputVisitorData; static void visitor_input_teardown(TestInputVisitorData *data, @@ -32,7 +32,7 @@ static void visitor_input_teardown(TestInputVisitorData *data, data->obj = NULL; if (data->qiv) { - qmp_input_visitor_cleanup(data->qiv); + visit_free(data->qiv); data->qiv = NULL; } } @@ -44,8 +44,6 @@ static Visitor *visitor_input_test_init_internal(TestInputVisitorData *data, const char *json_string, va_list *ap) { - Visitor *v; - visitor_input_teardown(data, NULL); data->obj = qobject_from_jsonv(json_string, ap); @@ -53,11 +51,7 @@ static Visitor *visitor_input_test_init_internal(TestInputVisitorData *data, data->qiv = qmp_input_visitor_new(data->obj, false); g_assert(data->qiv); - - v = qmp_input_get_visitor(data->qiv); - g_assert(v); - - return v; + return data->qiv; } static GCC_FMT_ATTR(2, 3) |