aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-17 21:38:16 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-02-22 19:51:56 +0100
commit4d96f329cc24ace3766030bcffb05256a31d32d1 (patch)
tree2ebe07bd199d4f5cb10fe371278fbedce5d09edb /tests/libqtest.c
parent9eaaf971683c99ed197fa1b7d1a3ca9baabfb3ee (diff)
libqtest: Clean up qmp_response() a bit
Use qobject_to_qdict() instead of a type cast. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1487363905-9480-6-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r--tests/libqtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c
index d8fba6647a..e54354de8a 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -379,9 +379,9 @@ static void qmp_response(JSONMessageParser *parser, GQueue *tokens)
exit(1);
}
- g_assert(qobject_type(obj) == QTYPE_QDICT);
g_assert(!qmp->response);
- qmp->response = (QDict *)obj;
+ qmp->response = qobject_to_qdict(obj);
+ g_assert(qmp->response);
}
QDict *qmp_fd_receive(int fd)