Properly zero the kevent in kq_setup_kevent()
authorSebastian Hahn <sebastian@torproject.org>
Tue, 13 Mar 2012 07:33:06 +0000 (08:33 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Tue, 13 Mar 2012 07:33:06 +0000 (08:33 +0100)
Detected by clang

kqueue.c

index 8276f0471cebfb9c24abd20f15ee3fb1b0d93d21..51984a4e41d373f94886f2f755179278a706424f 100644 (file)
--- a/kqueue.c
+++ b/kqueue.c
@@ -176,7 +176,7 @@ kq_sighandler(int sig)
 static void
 kq_setup_kevent(struct kevent *out, evutil_socket_t fd, int filter, short change)
 {
-       memset(out, 0, sizeof(out));
+       memset(out, 0, sizeof(struct kevent));
        out->ident = fd;
        out->filter = filter;