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>
This commit is contained in:
Markus Armbruster 2020-03-17 12:54:49 +01:00
parent a62c61747f
commit 4a8837389e

View file

@ -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());
}