diff options
author | root <root> | 2007-10-31 16:29:52 +0000 |
---|---|---|
committer | root <root> | 2007-10-31 16:29:52 +0000 |
commit | caa1fd0cc89d111a00f323bb6eff46f57311aed5 (patch) | |
tree | e5d9627b47ccf3c0a037d861d5c4948cacaff7ad | |
parent | b7186278d06b224100f3bbaed1976d014246bbd9 (diff) |
make libev safer w.r.t. reentrancy
-rw-r--r-- | ev.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -418,11 +418,9 @@ fd_reify (void) static void call_pending () { - int i; - - for (i = 0; i < pendingcnt; ++i) + while (pendingcnt) { - ANPENDING *p = pendings + i; + ANPENDING *p = pendings + --pendingcnt; if (p->w) { @@ -430,8 +428,6 @@ call_pending () p->w->cb (p->w, p->events); } } - - pendingcnt = 0; } static void |