diff options
author | Fam Zheng <famz@redhat.com> | 2017-04-21 20:26:58 +0800 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-04-24 09:12:59 +0200 |
commit | 6dffc1f670c2d49b6b5d06b6a559dcf08c33443b (patch) | |
tree | dcbd8bbe985766dad78231cde5c93373f40a1688 /util/qemu-sockets.c | |
parent | 226799cec5fa51681a5b8c24d1bebdd735c14a8c (diff) | |
download | qemu-6dffc1f670c2d49b6b5d06b6a559dcf08c33443b.zip qemu-6dffc1f670c2d49b6b5d06b6a559dcf08c33443b.tar.gz qemu-6dffc1f670c2d49b6b5d06b6a559dcf08c33443b.tar.bz2 |
socket: Make errp the last parameter of inet_connect_saddr
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170421122710.15373-3-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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index f79d334..8e11349 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -427,8 +427,9 @@ static struct addrinfo *inet_parse_connect_saddr(InetSocketAddress *saddr, * function succeeds, callback will be called when the connection * completes, with the file descriptor on success, or -1 on error. */ -int inet_connect_saddr(InetSocketAddress *saddr, Error **errp, - NonBlockingConnectHandler *callback, void *opaque) +int inet_connect_saddr(InetSocketAddress *saddr, + NonBlockingConnectHandler *callback, void *opaque, + Error **errp) { Error *local_err = NULL; struct addrinfo *res, *e; @@ -659,7 +660,7 @@ int inet_connect(const char *str, Error **errp) addr = inet_parse(str, errp); if (addr != NULL) { - sock = inet_connect_saddr(addr, errp, NULL, NULL); + sock = inet_connect_saddr(addr, NULL, NULL, errp); qapi_free_InetSocketAddress(addr); } return sock; @@ -1081,7 +1082,7 @@ int socket_connect(SocketAddress *addr, NonBlockingConnectHandler *callback, switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: - fd = inet_connect_saddr(addr->u.inet.data, errp, callback, opaque); + fd = inet_connect_saddr(addr->u.inet.data, callback, opaque, errp); break; case SOCKET_ADDRESS_KIND_UNIX: |