More changes related to uv_close returning void

This commit is contained in:
Bert Belder 2011-07-21 03:27:43 +02:00
parent b931c9313f
commit d9612fe0e7
2 changed files with 9 additions and 12 deletions

View File

@ -40,7 +40,7 @@ int uv_is_active(uv_handle_t* handle) {
/* TODO: integrate this with uv_close. */
static int uv_close_error(uv_handle_t* handle, uv_err_t e) {
static void uv_close_error(uv_handle_t* handle, uv_err_t e) {
uv_tcp_t* tcp;
uv_pipe_t* pipe;
@ -66,7 +66,7 @@ static int uv_close_error(uv_handle_t* handle, uv_err_t e) {
if (tcp->reqs_pending == 0) {
uv_want_endgame(handle);
}
return 0;
return;
case UV_NAMED_PIPE:
pipe = (uv_pipe_t*)handle;
@ -75,38 +75,37 @@ static int uv_close_error(uv_handle_t* handle, uv_err_t e) {
if (pipe->reqs_pending == 0) {
uv_want_endgame(handle);
}
return 0;
return;
case UV_TIMER:
uv_timer_stop((uv_timer_t*)handle);
uv_want_endgame(handle);
return 0;
return;
case UV_PREPARE:
uv_prepare_stop((uv_prepare_t*)handle);
uv_want_endgame(handle);
return 0;
return;
case UV_CHECK:
uv_check_stop((uv_check_t*)handle);
uv_want_endgame(handle);
return 0;
return;
case UV_IDLE:
uv_idle_stop((uv_idle_t*)handle);
uv_want_endgame(handle);
return 0;
return;
case UV_ASYNC:
if (!((uv_async_t*)handle)->async_sent) {
uv_want_endgame(handle);
}
return 0;
return;
default:
/* Not supported */
assert(0);
return -1;
abort();
}
}

View File

@ -146,8 +146,6 @@ static void async2_cb(uv_handle_t* handle, int status) {
static void prepare_cb(uv_prepare_t* handle, int status) {
int r;
ASSERT(handle == &prepare_handle);
ASSERT(status == 0);