diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-08-31 03:56:38 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-09-01 08:02:13 +0200 |
commit | daa229ace3f15e985ce0873e881163d748f6d969 (patch) | |
tree | cc258f6674122188aa8a3bead24fb5f84206ab10 /test/test-tcp-bind6-error.c | |
parent | 81840768790c68595362174c5a26903173029993 (diff) | |
download | libuv-daa229ace3f15e985ce0873e881163d748f6d969.tar.gz libuv-daa229ace3f15e985ce0873e881163d748f6d969.zip |
include: uv_tcp_bind{6} now takes sockaddr_in*
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.
Fixes #684.
Diffstat (limited to 'test/test-tcp-bind6-error.c')
-rw-r--r-- | test/test-tcp-bind6-error.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test-tcp-bind6-error.c b/test/test-tcp-bind6-error.c index ee9e2a72..e92afef7 100644 --- a/test/test-tcp-bind6-error.c +++ b/test/test-tcp-bind6-error.c @@ -43,12 +43,12 @@ TEST_IMPL(tcp_bind6_error_addrinuse) { r = uv_tcp_init(uv_default_loop(), &server1); ASSERT(r == 0); - r = uv_tcp_bind6(&server1, addr); + r = uv_tcp_bind6(&server1, &addr); ASSERT(r == 0); r = uv_tcp_init(uv_default_loop(), &server2); ASSERT(r == 0); - r = uv_tcp_bind6(&server2, addr); + r = uv_tcp_bind6(&server2, &addr); ASSERT(r == 0); r = uv_listen((uv_stream_t*)&server1, 128, NULL); @@ -77,7 +77,7 @@ TEST_IMPL(tcp_bind6_error_addrnotavail) { r = uv_tcp_init(uv_default_loop(), &server); ASSERT(r == 0); - r = uv_tcp_bind6(&server, addr); + r = uv_tcp_bind6(&server, &addr); ASSERT(r == UV_EADDRNOTAVAIL); uv_close((uv_handle_t*)&server, close_cb); @@ -101,7 +101,7 @@ TEST_IMPL(tcp_bind6_error_fault) { r = uv_tcp_init(uv_default_loop(), &server); ASSERT(r == 0); - r = uv_tcp_bind6(&server, *garbage_addr); + r = uv_tcp_bind6(&server, garbage_addr); ASSERT(r == UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); @@ -127,9 +127,9 @@ TEST_IMPL(tcp_bind6_error_inval) { r = uv_tcp_init(uv_default_loop(), &server); ASSERT(r == 0); - r = uv_tcp_bind6(&server, addr1); + r = uv_tcp_bind6(&server, &addr1); ASSERT(r == 0); - r = uv_tcp_bind6(&server, addr2); + r = uv_tcp_bind6(&server, &addr2); ASSERT(r == UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); @@ -152,7 +152,7 @@ TEST_IMPL(tcp_bind6_localhost_ok) { r = uv_tcp_init(uv_default_loop(), &server); ASSERT(r == 0); - r = uv_tcp_bind6(&server, addr); + r = uv_tcp_bind6(&server, &addr); ASSERT(r == 0); MAKE_VALGRIND_HAPPY(); |