trivial patches for 2017-07-12

-----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAllmKxMPHG1qdEB0bHMu
 bXNrLnJ1AAoJEHAbT2saaT5Zl/MH/3Q3kQCJxqYItokv+LvZscBKeTJEmpM+Tvjj
 PRMst9odru643WBn43RMyePAOcBaQzGHvV9cyX6F2QUxqW0fe+uiRy+21rWo1N8v
 uYYjMdiB6yd+yru09NmcddiZE6U6Zfo3W7XYFdcyqF1+vzA1McY9Csw0OvhKPPS2
 iZnhW9SqEkw+eAf+NQJySo9pyXmLZ6i3D7HNwKetpj+N6cJtF6IK4wbgUHTNfK75
 fk/B5FOogvM+P0a+0Y5ipShVyCFkpDklH+ZK+PpuhRMBnwCClyDKSAQ0v6Fm8WNR
 O+GRsVP2e0grpKs8dIo6e2iX2siWi/oVyT5jSyQID0BO0kENLc8=
 =jY0M
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging

trivial patches for 2017-07-12

# gpg: Signature made Wed 12 Jul 2017 14:58:43 BST
# gpg:                using RSA key 0x701B4F6B1A693E59
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* remotes/mjt/tags/trivial-patches-fetch:
  include/hw/ptimer.h: Add documentation comments
  hxtool: remove dead -q option
  qga-win32: Fix memory leak of device information set
  hw/core: fix missing return value in load_image_targphys_as()
  elf-loader: warn about invalid endianness
  configure: Handle having no c++ compiler in FORTIFY_SOURCE check
  hw/pci: define msi_nonbroken in pci-stub
  hw/misc: add missing includes
  configure: Fix build with pkg-config and --static --enable-sdl
  util/qemu-sockets: Drop unused helper socket_address_to_string()
  target/xtensa: gdbstub: drop dead return statement

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2017-07-13 16:15:52 +01:00
commit aa5a704756
10 changed files with 140 additions and 99 deletions

View file

@ -1325,40 +1325,6 @@ SocketAddress *socket_remote_address(int fd, Error **errp)
return socket_sockaddr_to_address(&ss, sslen, errp);
}
char *socket_address_to_string(struct SocketAddress *addr, Error **errp)
{
char *buf;
InetSocketAddress *inet;
switch (addr->type) {
case SOCKET_ADDRESS_TYPE_INET:
inet = &addr->u.inet;
if (strchr(inet->host, ':') == NULL) {
buf = g_strdup_printf("%s:%s", inet->host, inet->port);
} else {
buf = g_strdup_printf("[%s]:%s", inet->host, inet->port);
}
break;
case SOCKET_ADDRESS_TYPE_UNIX:
buf = g_strdup(addr->u.q_unix.path);
break;
case SOCKET_ADDRESS_TYPE_FD:
buf = g_strdup(addr->u.fd.str);
break;
case SOCKET_ADDRESS_TYPE_VSOCK:
buf = g_strdup_printf("%s:%s",
addr->u.vsock.cid,
addr->u.vsock.port);
break;
default:
abort();
}
return buf;
}
SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy)
{