Hi

On Sun, Mar 15, 2020 at 3:48 PM Markus Armbruster <arm...@redhat.com> wrote:
>
> Signed-off-by: Markus Armbruster <arm...@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 112d29a9ab..fb53687ce9 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

"for an"

Can we assert that the command's schema has no 'returns' in this case?

> +         * object then; supply it.
> +         */
>          ret = QOBJECT(qdict_new());
>      }
>
> --
> 2.21.1
>
>


-- 
Marc-André Lureau

Reply via email to