diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-03-06 11:53:27 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-03-06 11:53:27 +0000 |
commit | 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f (patch) | |
tree | 12e5fa81ad1f1cf455c598a5351c1b4248b38b84 /util | |
parent | 3c0f12df65da872d5fbccae469f2cb21ed1c03b7 (diff) | |
parent | 48eb62a74fc2d6b0ae9e5f414304a85cfbf33066 (diff) | |
download | qemu-1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f.zip |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-04' into staging
QAPI patches for 2016-03-04
# gpg: Signature made Sat 05 Mar 2016 09:47:19 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
* remotes/armbru/tags/pull-qapi-2016-03-04:
qapi: Drop useless 'data' member of unions
chardev: Drop useless ChardevDummy type
qapi: Avoid use of 'data' member of QAPI unions
ui: Shorten references into InputEvent
util: Shorten references into SocketAddress
chardev: Shorten references into ChardevBackend
qapi: Update docs to match recent generator changes
qapi-visit: Expose visit_type_FOO_members()
qapi: Rename 'fields' to 'members' in generated C code
qapi: Rename 'fields' to 'members' in generator
qapi-dealloc: Reduce use outside of generated code
qmp-shell: fix pretty printing of JSON responses
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-sockets.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 557da20bf2..ad7c00c9ad 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1003,6 +1003,7 @@ socket_sockaddr_to_address_inet(struct sockaddr_storage *sa, char host[NI_MAXHOST]; char serv[NI_MAXSERV]; SocketAddress *addr; + InetSocketAddress *inet; int ret; ret = getnameinfo((struct sockaddr *)sa, salen, @@ -1017,13 +1018,13 @@ socket_sockaddr_to_address_inet(struct sockaddr_storage *sa, addr = g_new0(SocketAddress, 1); addr->type = SOCKET_ADDRESS_KIND_INET; - addr->u.inet = g_new0(InetSocketAddress, 1); - addr->u.inet->host = g_strdup(host); - addr->u.inet->port = g_strdup(serv); + inet = addr->u.inet = g_new0(InetSocketAddress, 1); + inet->host = g_strdup(host); + inet->port = g_strdup(serv); if (sa->ss_family == AF_INET) { - addr->u.inet->has_ipv4 = addr->u.inet->ipv4 = true; + inet->has_ipv4 = inet->ipv4 = true; } else { - addr->u.inet->has_ipv6 = addr->u.inet->ipv6 = true; + inet->has_ipv6 = inet->ipv6 = true; } return addr; |