mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-17 08:17:42 -04:00
Valgrind fix: Clear struct kevent before checking for OSX bug.
William's original commit message: Valgrind complains on startup because kq_init passes to kevent only a partially initialized structure. The code doesn't expect kevent to look at .fflags, .udata, or .data, I suppose, because it merely tickles the kernel looking for an error response. But perhaps that's unwarranted chuminess (notwithstanding that it's checking for an OS X bug), and needless noise nonetheless.
This commit is contained in:
parent
d014edb2c0
commit
5713d5dd33
1
kqueue.c
1
kqueue.c
@ -140,6 +140,7 @@ kq_init(struct event_base *base)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for Mac OS X kqueue bug. */
|
/* Check for Mac OS X kqueue bug. */
|
||||||
|
memset(&kqueueop->changes[0], 0, sizeof kqueueop->changes[0]);
|
||||||
kqueueop->changes[0].ident = -1;
|
kqueueop->changes[0].ident = -1;
|
||||||
kqueueop->changes[0].filter = EVFILT_READ;
|
kqueueop->changes[0].filter = EVFILT_READ;
|
||||||
kqueueop->changes[0].flags = EV_ADD;
|
kqueueop->changes[0].flags = EV_ADD;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user