[libvirt] [RFC PATCH 12/19] qapi: Replace qmp_dispatch()'s TODO comment by an explanation

Markus Armbruster armbru at redhat.com
Thu Oct 24 12:34:51 UTC 2019


Signed-off-by: Markus Armbruster <armbru at redhat.com>
---
 qapi/qmp-dispatch.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 0cbb663097..55bc224c61 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -164,7 +164,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 the empty
+         * object then; supply it.
+         */
         ret = QOBJECT(qdict_new());
     }
 
-- 
2.21.0




More information about the libvir-list mailing list