OSDN Git Service

hmp: Simplify how qmp_human_monitor_command() gets output
authorMarkus Armbruster <armbru@redhat.com>
Fri, 11 Dec 2020 17:11:33 +0000 (18:11 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 19 Dec 2020 09:38:19 +0000 (10:38 +0100)
commit436054e22f8447692196ddae7012f6083140e461
tree9565ada1065864b42ff5a31703065e09390c344c
parent28f1c1f6e07c4bb4d79bed9474d1425c55e21712
hmp: Simplify how qmp_human_monitor_command() gets output

Commit 48c043d0d1 "hmp: human-monitor-command: stop using the Memory
chardev driver" left us "if string is non-empty, duplicate it, else
duplicate the empty string".  Meh.  Duplicate it unconditionally.

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201211171152.146877-2-armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
monitor/misc.c