fix stop function of idle/check/prepare

This commit is contained in:
Marc Alexander Lehmann 2007-11-11 01:29:49 +00:00
parent 4e4ecb8dc4
commit 1d01fbe120
1 changed files with 3 additions and 3 deletions

6
ev.c
View File

@ -1436,7 +1436,7 @@ void
ev_idle_stop (EV_P_ struct ev_idle *w)
{
ev_clear_pending (EV_A_ (W)w);
if (ev_is_active (w))
if (!ev_is_active (w))
return;
idles [((W)w)->active - 1] = idles [--idlecnt];
@ -1458,7 +1458,7 @@ void
ev_prepare_stop (EV_P_ struct ev_prepare *w)
{
ev_clear_pending (EV_A_ (W)w);
if (ev_is_active (w))
if (!ev_is_active (w))
return;
prepares [((W)w)->active - 1] = prepares [--preparecnt];
@ -1480,7 +1480,7 @@ void
ev_check_stop (EV_P_ struct ev_check *w)
{
ev_clear_pending (EV_A_ (W)w);
if (ev_is_active (w))
if (!ev_is_active (w))
return;
checks [((W)w)->active - 1] = checks [--checkcnt];