From e0c6114e32c1c79b6dca15654af90f8a741e1ce7 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 11 Jun 2012 17:13:31 +0200 Subject: [PATCH] windows: remove run-time RB_INSERT check from release builds --- src/win/timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win/timer.c b/src/win/timer.c index 69638bc9..5ddcfca1 100644 --- a/src/win/timer.c +++ b/src/win/timer.c @@ -90,6 +90,7 @@ void uv_timer_endgame(uv_loop_t* loop, uv_timer_t* handle) { int uv_timer_start(uv_timer_t* handle, uv_timer_cb timer_cb, int64_t timeout, int64_t repeat) { uv_loop_t* loop = handle->loop; + uv_timer_t* old; if (handle->flags & UV_HANDLE_ACTIVE) { RB_REMOVE(uv_timer_tree_s, &loop->timers, handle); @@ -101,9 +102,8 @@ int uv_timer_start(uv_timer_t* handle, uv_timer_cb timer_cb, int64_t timeout, handle->flags |= UV_HANDLE_ACTIVE; uv__handle_start(handle); - if (RB_INSERT(uv_timer_tree_s, &loop->timers, handle) != NULL) { - uv_fatal_error(ERROR_INVALID_DATA, "RB_INSERT"); - } + old = RB_INSERT(uv_timer_tree_s, &loop->timers, handle); + assert(old == NULL); return 0; }