aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-03-17 12:54:49 +0100
committerMarkus Armbruster <armbru@redhat.com>2020-03-17 21:41:33 +0100
commit4a8837389ef28554a57cdad8e2fc90ae1362dcb2 (patch)
treeb7a568b27d91a3d41c821e6342194cdc50da50bf /qapi
parenta62c61747fc0934e0f42a37aa078a21c50565fe6 (diff)
qapi: Replace qmp_dispatch()'s TODO comment by an explanation
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200317115459.31821-25-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qmp-dispatch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 91e50fa0dd..44fc368d61 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -162,7 +162,11 @@ QDict *qmp_dispatch(QmpCommandList *cmds, QObject *request,
g_assert(!ret);
return NULL;
} else if (!ret) {
- /* TODO turn into assertion */
+ /*
+ * When the command's schema has no 'returns', cmd->fn()
+ * leaves @ret null. The QMP spec calls for an empty object
+ * then; supply it.
+ */
ret = QOBJECT(qdict_new());
}