aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-sockets.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-04-21 20:26:59 +0800
committerMarkus Armbruster <armbru@redhat.com>2017-04-24 09:12:59 +0200
commit2bdc6791b9c689e920b78d36553ed94051140c76 (patch)
treeca0044c7ac7cf7dd97236acc04e49b8e9b670f9d /util/qemu-sockets.c
parent6dffc1f670c2d49b6b5d06b6a559dcf08c33443b (diff)
downloadqemu-2bdc6791b9c689e920b78d36553ed94051140c76.zip
qemu-2bdc6791b9c689e920b78d36553ed94051140c76.tar.gz
qemu-2bdc6791b9c689e920b78d36553ed94051140c76.tar.bz2
socket: Make errp the last parameter of unix_connect_saddr
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-4-famz@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'util/qemu-sockets.c')
-rw-r--r--util/qemu-sockets.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 8e11349..0fe5f13 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -911,8 +911,9 @@ err:
return -1;
}
-static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp,
- NonBlockingConnectHandler *callback, void *opaque)
+static int unix_connect_saddr(UnixSocketAddress *saddr,
+ NonBlockingConnectHandler *callback, void *opaque,
+ Error **errp)
{
struct sockaddr_un un;
ConnectState *connect_state = NULL;
@@ -979,8 +980,9 @@ static int unix_listen_saddr(UnixSocketAddress *saddr,
return -1;
}
-static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp,
- NonBlockingConnectHandler *callback, void *opaque)
+static int unix_connect_saddr(UnixSocketAddress *saddr,
+ NonBlockingConnectHandler *callback, void *opaque,
+ Error **errp)
{
error_setg(errp, "unix sockets are not available on windows");
errno = ENOTSUP;
@@ -1026,7 +1028,7 @@ int unix_connect(const char *path, Error **errp)
saddr = g_new0(UnixSocketAddress, 1);
saddr->path = g_strdup(path);
- sock = unix_connect_saddr(saddr, errp, NULL, NULL);
+ sock = unix_connect_saddr(saddr, NULL, NULL, errp);
qapi_free_UnixSocketAddress(saddr);
return sock;
}
@@ -1086,7 +1088,7 @@ int socket_connect(SocketAddress *addr, NonBlockingConnectHandler *callback,
break;
case SOCKET_ADDRESS_KIND_UNIX:
- fd = unix_connect_saddr(addr->u.q_unix.data, errp, callback, opaque);
+ fd = unix_connect_saddr(addr->u.q_unix.data, callback, opaque, errp);
break;
case SOCKET_ADDRESS_KIND_FD: