aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-06-09 10:48:40 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-07-06 10:52:04 +0200
commit1830f22a6777cedaccd67a08f675d30f7a85ebfd (patch)
tree670b25499662717a64a8685e04e90daf06f064bd /tests
parente7ca56562990991bc614a43b9351ee0737f3045d (diff)
qmp-output-visitor: Favor new visit_free() function
Now that we have a polymorphic visit_free(), we no longer need qmp_output_visitor_cleanup(); however, we still need to expose the subtype for qmp_output_get_qobject(). Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1465490926-28625-10-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/check-qnull.c2
-rw-r--r--tests/test-qmp-output-visitor.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/check-qnull.c b/tests/check-qnull.c
index d0412e4169..6310bf7d41 100644
--- a/tests/check-qnull.c
+++ b/tests/check-qnull.c
@@ -58,7 +58,7 @@ static void qnull_visit_test(void)
obj = qmp_output_get_qobject(qov);
g_assert(obj == &qnull_);
qobject_decref(obj);
- qmp_output_visitor_cleanup(qov);
+ visit_free(qmp_output_get_visitor(qov));
g_assert(qnull_.refcnt == 1);
}
diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c
index 75c8e1b3e0..45d87fb160 100644
--- a/tests/test-qmp-output-visitor.c
+++ b/tests/test-qmp-output-visitor.c
@@ -38,7 +38,7 @@ static void visitor_output_setup(TestOutputVisitorData *data,
static void visitor_output_teardown(TestOutputVisitorData *data,
const void *unused)
{
- qmp_output_visitor_cleanup(data->qov);
+ visit_free(data->ov);
data->qov = NULL;
data->ov = NULL;
}