windows: remove run-time RB_INSERT check from release builds

This commit is contained in:
Bert Belder 2012-06-11 17:13:31 +02:00
parent 3b417d10bc
commit e0c6114e32

View File

@ -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;
}