qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 24/34] qapi: Replace qmp_dispatch()'s TODO comment by an e


From: Eric Blake
Subject: Re: [PATCH v4 24/34] qapi: Replace qmp_dispatch()'s TODO comment by an explanation
Date: Tue, 17 Mar 2020 15:29:42 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/17/20 6:54 AM, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster <address@hidden>
---
  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 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());
      }

Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]