summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-26 21:55:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-26 21:55:04 +0000
commitf063862950bfa3c5a30f9e6101bd2d74b359b6c0 (patch)
tree62820177f49759bacd86c12bc124a878677e3ade /src/socketengine.cpp
parentda3134547f97127bc92eeac76a9a8dece4a3e07e (diff)
Valgrind fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3353 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index ec34bf74e..cec51c5d3 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -86,6 +86,7 @@ bool SocketEngine::AddFd(int fd, bool readable, char type)
log(DEBUG,"Add socket %d",fd);
#ifdef USE_EPOLL
struct epoll_event ev;
+ memset(&ev,0,sizeof(struct epoll_event));
log(DEBUG,"epoll: Add socket to events, ep=%d socket=%d",EngineHandle,fd);
readable ? ev.events = EPOLLIN : ev.events = EPOLLOUT;
ev.data.fd = fd;
@@ -138,6 +139,7 @@ bool SocketEngine::DelFd(int fd)
#endif
#ifdef USE_EPOLL
struct epoll_event ev;
+ memset(&ev,0,sizeof(struct epoll_event));
ref[fd] && X_READBIT ? ev.events = EPOLLIN : ev.events = EPOLLOUT;
ev.data.fd = fd;
int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev);