summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2012-05-08 15:50:49 +0000
committerroot <root>2012-05-08 15:50:49 +0000
commitc67390a5247b5f9c7b8624f9648dd048a54102c4 (patch)
treefe680dde1b013acf60104d85b35aa1ec315e9a77 /ev.c
parente2f8e6020448c0b1927bdce2239657d78817ee02 (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/ev.c b/ev.c
index 5590f23..fcd7707 100644
--- a/ev.c
+++ b/ev.c
@@ -2565,7 +2565,7 @@ void ecb_cold
ev_verify (EV_P) EV_THROW
{
#if EV_VERIFY
- int i, j;
+ int i;
WL w, w2;
assert (activecnt >= -1);
@@ -2575,20 +2575,24 @@ ev_verify (EV_P) EV_THROW
assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0));
assert (anfdmax >= 0);
- for (i = j = 0; i < anfdmax; ++i)
- for (w = w2 = anfds [i].head; w; w = w->next)
- {
- verify_watcher (EV_A_ (W)w);
+ for (i = 0; i < anfdmax; ++i)
+ {
+ int j = 0;
- if (j++ & 1)
- {
- assert (("libev: io watcher list contains a loop", w != w2));
- w2 = w2->next;
- }
+ for (w = w2 = anfds [i].head; w; w = w->next)
+ {
+ verify_watcher (EV_A_ (W)w);
- assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1));
- assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i));
- }
+ if (j++ & 1)
+ {
+ assert (("libev: io watcher list contains a loop", w != w2));
+ w2 = w2->next;
+ }
+
+ assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1));
+ assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i));
+ }
+ }
assert (timermax >= timercnt);
verify_heap (EV_A_ timers, timercnt);