diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-07-03 10:53:49 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-07-03 23:18:56 +0200 |
commit | d43b16945afa8457b03aee543a110c4ff0b7f070 (patch) | |
tree | 3639afe23f1067412e3eaa6baa2bf345ef2b5fc1 /qapi | |
parent | cee32796cadc9510ee00f029a933009df7a28ae2 (diff) | |
download | qemu-d43b16945afa8457b03aee543a110c4ff0b7f070.zip qemu-d43b16945afa8457b03aee543a110c4ff0b7f070.tar.gz qemu-d43b16945afa8457b03aee543a110c4ff0b7f070.tar.bz2 |
qmp: Use QDict * instead of QObject * for response objects
By using the more specific type, we get fewer downcasts. The
downcasts are safe, but not obviously so, at least not locally.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-24-armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/qmp-dispatch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index c85748a..761812e 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -161,8 +161,8 @@ bool qmp_is_oob(QDict *dict) && !qdict_haskey(dict, "execute"); } -QObject *qmp_dispatch(QmpCommandList *cmds, QObject *request, - bool allow_oob) +QDict *qmp_dispatch(QmpCommandList *cmds, QObject *request, + bool allow_oob) { Error *err = NULL; QObject *ret; @@ -179,5 +179,5 @@ QObject *qmp_dispatch(QmpCommandList *cmds, QObject *request, rsp = NULL; } - return QOBJECT(rsp); + return rsp; } |