Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3260)

Unified Diff: base/third_party/libevent/kqueue.c

Issue 2134603002: Fix a logic bug in kqueue.c. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/third_party/libevent/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/third_party/libevent/kqueue.c
diff --git a/base/third_party/libevent/kqueue.c b/base/third_party/libevent/kqueue.c
index ee740eec1d675e915fde959d93ace04a4ee5c7ab..3c2ffd5524cc6a5be496fd27276c7d8c8381d4ff 100644
--- a/base/third_party/libevent/kqueue.c
+++ b/base/third_party/libevent/kqueue.c
@@ -140,28 +140,6 @@ kq_init(struct event_base *base)
TAILQ_INIT(&kqueueop->evsigevents[i]);
}
- /* Check for Mac OS X kqueue bug. */
- memset(&kqueueop->changes[0], 0, sizeof kqueueop->changes[0]);
- kqueueop->changes[0].ident = -1;
- kqueueop->changes[0].filter = EVFILT_READ;
- kqueueop->changes[0].flags = EV_ADD;
- /*
- * If kqueue works, then kevent will succeed, and it will
- * stick an error in events[0]. If kqueue is broken, then
- * kevent will fail.
- */
- if (kevent(kq,
- kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
- kqueueop->events[0].ident != -1 ||
- kqueueop->events[0].flags != EV_ERROR) {
- event_warn("%s: detected broken kqueue; not using.", __func__);
- free(kqueueop->changes);
- free(kqueueop->events);
- free(kqueueop);
- close(kq);
- return (NULL);
- }
-
return (kqueueop);
}
« no previous file with comments | « base/third_party/libevent/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698