diff mbox series

[v3,06/38] monitor: no need to remove desc before replacing it

Message ID 20180326150916.9602-7-marcandre.lureau@redhat.com
State New
Headers show
Series RFC: monitor: add asynchronous command type | expand

Commit Message

Marc-André Lureau March 26, 2018, 3:08 p.m. UTC
The following qdict_put() line does replace the value, as the
documentation says.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 monitor.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Eric Blake March 26, 2018, 7:31 p.m. UTC | #1
On 03/26/2018 10:08 AM, Marc-André Lureau wrote:
> The following qdict_put() line does replace the value, as the
> documentation says.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   monitor.c | 1 -
>   1 file changed, 1 deletion(-)

This patch is unneeded once Peter's change lands:
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06513.html
as that patch also deletes the line in question.

It may be worth waiting for the OOB stuff to settle and then rebase the 
remaining cleanups as a separate series from the async command addition, 
especially if some of the cleanups are still relevant as minor bug fixes 
for 2.12.
diff mbox series

Patch

diff --git a/monitor.c b/monitor.c
index a8dcfa283e..5889a32231 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3930,7 +3930,6 @@  static void monitor_qmp_respond(Monitor *mon, QObject *rsp,
                 && !g_strcmp0(qdict_get_try_str(qdict, "class"),
                           QapiErrorClass_str(ERROR_CLASS_COMMAND_NOT_FOUND))) {
                 /* Provide a more useful error message */
-                qdict_del(qdict, "desc");
                 qdict_put_str(qdict, "desc", "Expecting capabilities"
                               " negotiation with 'qmp_capabilities'");
             }