diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-07 13:30:14 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-07 13:30:14 +0200 |
commit | 30fec322809582f91be70cc1bb16c9678180db76 (patch) | |
tree | 464446f79af6259b4e280514eac25bea7777b014 /src/socketengines/socketengine_kqueue.cpp | |
parent | 4d7c590bb6a937c4c412241ae67b9fc74083b365 (diff) |
Relax fd bounds checking
We can cope with fds greater than SocketEngine::GetMaxFds() since 3752b3f59d5216d7dc6221a361efc76b9ad2273d
Diffstat (limited to 'src/socketengines/socketengine_kqueue.cpp')
-rw-r--r-- | src/socketengines/socketengine_kqueue.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp index b7797a82f..68c1bda8c 100644 --- a/src/socketengines/socketengine_kqueue.cpp +++ b/src/socketengines/socketengine_kqueue.cpp @@ -105,7 +105,7 @@ bool SocketEngine::AddFd(EventHandler* eh, int event_mask) { int fd = eh->GetFd(); - if ((fd < 0) || (fd > GetMaxFds() - 1)) + if (fd < 0) return false; if (!SocketEngine::AddFdRef(eh)) @@ -128,7 +128,7 @@ void SocketEngine::DelFd(EventHandler* eh) { int fd = eh->GetFd(); - if ((fd < 0) || (fd > GetMaxFds() - 1)) + if (fd < 0) { ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "DelFd() on invalid fd: %d", fd); return; |