X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/c92198a5c36ea9d1b1e0fae8254eb5609553bbf9..b4ea51ffb8ad1cf82bc52c03035eb335e2b4c88c:/ev.c?ds=sidebyside diff --git a/ev.c b/ev.c index 808e07d..823b68c 100644 --- a/ev.c +++ b/ev.c @@ -1548,14 +1548,15 @@ ev_clear_pending (EV_P_ void *w) W w_ = (W)w; int pending = w_->pending; - if (!pending) + if (expect_true (pending)) + { + ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; + w_->pending = 0; + p->w = 0; + return p->events; + } + else return 0; - - w_->pending = 0; - ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; - p->w = 0; - - return p->events; } void inline_size