From ca781714c1651a9e7042eb930c6b117449f8e1fc Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 20 Jul 2008 08:53:56 +0000 Subject: Fixes to some stuff that writes on memory it shouldn't (thanks psychon). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10047 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengines/socketengine_epoll.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/socketengines') diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp index 5552cccf6..6b8954412 100644 --- a/src/socketengines/socketengine_epoll.cpp +++ b/src/socketengines/socketengine_epoll.cpp @@ -68,7 +68,7 @@ bool EPollEngine::AddFd(EventHandler* eh) } struct epoll_event ev; - memset(&ev,0,sizeof(struct epoll_event)); + memset(&ev,0,sizeof(ev)); eh->Readable() ? ev.events = EPOLLIN : ev.events = EPOLLOUT; ev.data.fd = fd; int i = epoll_ctl(EngineHandle, EPOLL_CTL_ADD, fd, &ev); @@ -91,7 +91,7 @@ void EPollEngine::WantWrite(EventHandler* eh) * status for us and saves us a call. */ struct epoll_event ev; - memset(&ev,0,sizeof(struct epoll_event)); + memset(&ev,0,sizeof(ev)); ev.events = EPOLLOUT; ev.data.fd = eh->GetFd(); epoll_ctl(EngineHandle, EPOLL_CTL_MOD, eh->GetFd(), &ev); @@ -107,7 +107,7 @@ bool EPollEngine::DelFd(EventHandler* eh, bool force) } struct epoll_event ev; - memset(&ev,0,sizeof(struct epoll_event)); + memset(&ev,0,sizeof(ev)); eh->Readable() ? ev.events = EPOLLIN : ev.events = EPOLLOUT; ev.data.fd = fd; int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev); @@ -181,7 +181,7 @@ int EPollEngine::DispatchEvents() { WriteEvents++; struct epoll_event ev; - memset(&ev,0,sizeof(struct epoll_event)); + memset(&ev,0,sizeof(ev)); ev.events = EPOLLIN; ev.data.fd = events[j].data.fd; epoll_ctl(EngineHandle, EPOLL_CTL_MOD, events[j].data.fd, &ev); -- cgit v1.2.3