summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_epoll.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-20 08:53:56 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-20 08:53:56 +0000
commitca781714c1651a9e7042eb930c6b117449f8e1fc (patch)
tree626d56d3997cfffcfaecf8461ed6cfceed74b200 /src/socketengines/socketengine_epoll.cpp
parent2d4a319d961e3f9e6aa9f7926f9ed320d72de8da (diff)
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
Diffstat (limited to 'src/socketengines/socketengine_epoll.cpp')
-rw-r--r--src/socketengines/socketengine_epoll.cpp8
1 files changed, 4 insertions, 4 deletions
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);