diff --git a/test/benchmark-pump.c b/test/benchmark-pump.c index 0269fa71..d0b09301 100644 --- a/test/benchmark-pump.c +++ b/test/benchmark-pump.c @@ -273,10 +273,12 @@ static void connection_cb(uv_stream_t* s, int status) { if (type == TCP) { stream = (uv_stream_t*)malloc(sizeof(uv_tcp_t)); - uv_tcp_init(loop, (uv_tcp_t*)stream); + r = uv_tcp_init(loop, (uv_tcp_t*)stream); + ASSERT(r == 0); } else { stream = (uv_stream_t*)malloc(sizeof(uv_pipe_t)); - uv_pipe_init(loop, (uv_pipe_t*)stream); + r = uv_pipe_init(loop, (uv_pipe_t*)stream); + ASSERT(r == 0); } r = uv_accept(s, stream); diff --git a/test/dns-server.c b/test/dns-server.c index cad5f722..086b52d1 100644 --- a/test/dns-server.c +++ b/test/dns-server.c @@ -272,7 +272,8 @@ static void on_connection(uv_stream_t* server, int status) { handle->state.prevbuf_pos = 0; handle->state.prevbuf_rem = 0; - uv_tcp_init(loop, (uv_tcp_t*)handle); + r = uv_tcp_init(loop, (uv_tcp_t*)handle); + ASSERT(r == 0); r = uv_accept(server, (uv_stream_t*)handle); ASSERT(r == 0); diff --git a/test/echo-server.c b/test/echo-server.c index 96e606bd..453ada66 100644 --- a/test/echo-server.c +++ b/test/echo-server.c @@ -144,13 +144,15 @@ static void on_connection(uv_stream_t* server, int status) { case TCP: stream = malloc(sizeof(uv_tcp_t)); ASSERT(stream != NULL); - uv_tcp_init(loop, (uv_tcp_t*)stream); + r = uv_tcp_init(loop, (uv_tcp_t*)stream); + ASSERT(r == 0); break; case PIPE: stream = malloc(sizeof(uv_pipe_t)); ASSERT(stream != NULL); - uv_pipe_init(loop, (uv_pipe_t*)stream); + r = uv_pipe_init(loop, (uv_pipe_t*)stream); + ASSERT(r == 0); break; default: diff --git a/test/test-connection-fail.c b/test/test-connection-fail.c index a5d6b1fd..2762aa28 100644 --- a/test/test-connection-fail.c +++ b/test/test-connection-fail.c @@ -134,7 +134,10 @@ TEST_IMPL(connection_fail) { * attempt. */ TEST_IMPL(connection_fail_doesnt_auto_close) { - uv_timer_init(uv_default_loop(), &timer); + int r; + + r = uv_timer_init(uv_default_loop(), &timer); + ASSERT(r == 0); connection_fail(on_connect_without_close); diff --git a/test/test-delayed-accept.c b/test/test-delayed-accept.c index 36c1dcf2..78531f68 100644 --- a/test/test-delayed-accept.c +++ b/test/test-delayed-accept.c @@ -57,7 +57,8 @@ static void do_accept(uv_timer_t* timer_handle, int status) { ASSERT(status == 0); ASSERT(accepted_handle != NULL); - uv_tcp_init(uv_default_loop(), accepted_handle); + r = uv_tcp_init(uv_default_loop(), accepted_handle); + ASSERT(r == 0); /* Test to that uv_default_loop()->counters.tcp_init does not increase across the uv_accept. */ tcpcnt = uv_default_loop()->counters.tcp_init; diff --git a/test/test-getsockname.c b/test/test-getsockname.c index 1f46ec3e..5dac88b7 100644 --- a/test/test-getsockname.c +++ b/test/test-getsockname.c @@ -117,7 +117,8 @@ static void on_connection(uv_stream_t* server, int status) { handle = (uv_handle_t*) malloc(sizeof(uv_tcp_t)); ASSERT(handle != NULL); - uv_tcp_init(loop, (uv_tcp_t*)handle); + r = uv_tcp_init(loop, (uv_tcp_t*)handle); + ASSERT(r == 0); /* associate server with stream */ handle->data = server; diff --git a/test/test-shutdown-eof.c b/test/test-shutdown-eof.c index d4ad085e..9d4f2cce 100644 --- a/test/test-shutdown-eof.c +++ b/test/test-shutdown-eof.c @@ -156,7 +156,9 @@ TEST_IMPL(shutdown_eof) { qbuf.base = "Q"; qbuf.len = 1; - uv_timer_init(uv_default_loop(), &timer); + r = uv_timer_init(uv_default_loop(), &timer); + ASSERT(r == 0); + uv_timer_start(&timer, timer_cb, 100, 0); server_addr = uv_ip4_addr("127.0.0.1", TEST_PORT);