aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-06-09 10:48:45 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-07-06 10:52:04 +0200
commit37f9e0a2b65a6dd5fe09cb0023b8001014aaaf01 (patch)
treed1fe710730adff2fa1c31449e380dbb38fad6ea6 /qemu-char.c
parenta15fcc3cf69ee3d408f60d6cc316488d2b0249b4 (diff)
sockets: Use new QAPI cloning
Rather than rolling our own clone via an expensive conversion in and back out of QObject, use the new clone visitor. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1465490926-28625-15-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c
index b73969ddbd..0698b98750 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -32,8 +32,7 @@
#include "sysemu/char.h"
#include "hw/usb.h"
#include "qmp-commands.h"
-#include "qapi/qmp-input-visitor.h"
-#include "qapi/qmp-output-visitor.h"
+#include "qapi/clone-visitor.h"
#include "qapi-visit.h"
#include "qemu/base64.h"
#include "io/channel-socket.h"
@@ -4389,7 +4388,7 @@ static CharDriverState *qmp_chardev_open_socket(const char *id,
}
}
- qapi_copy_SocketAddress(&s->addr, sock->addr);
+ s->addr = QAPI_CLONE(SocketAddress, sock->addr);
chr->opaque = s;
chr->chr_write = tcp_chr_write;