diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-07-03 10:53:53 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-07-03 23:18:56 +0200 |
commit | 62e93be286626839ef2597da81f70a3ba4a31fff (patch) | |
tree | 95644258937df51a922a339c785d03d8b882f6ec /qapi | |
parent | 7cb2123f226a88fddcb9a3673c658c818ee6daed (diff) |
qmp: Add some comments around null responses
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-28-armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/qmp-dispatch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 761812e924..6f2d466596 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -133,6 +133,7 @@ static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request, } else if (cmd->options & QCO_NO_SUCCESS_RESP) { g_assert(!ret); } else if (!ret) { + /* TODO turn into assertion */ ret = QOBJECT(qdict_new()); } @@ -176,6 +177,7 @@ QDict *qmp_dispatch(QmpCommandList *cmds, QObject *request, rsp = qdict_new(); qdict_put_obj(rsp, "return", ret); } else { + /* Can only happen for commands with QCO_NO_SUCCESS_RESP */ rsp = NULL; } |