diff options
author | Sadie Powell <sadie@witchery.services> | 2020-02-15 05:58:19 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-02-15 06:25:12 +0000 |
commit | 24f1224f770eb8f6a075d3c8bd083545c17bba10 (patch) | |
tree | 2955e3c0e789f8b3fd872a2e52d1fa3dda4b8656 /src/socketengine.cpp | |
parent | f9b4c280f8e7bec0c9237f9648c4fc5a77cfc468 (diff) |
Add HasFd to EventHandler and switch code to use it.
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r-- | src/socketengine.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp index 61655732e..e1aef6439 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -180,11 +180,7 @@ EventHandler* SocketEngine::GetRef(int fd) bool SocketEngine::BoundsCheckFd(EventHandler* eh) { - if (!eh) - return false; - if (eh->GetFd() < 0) - return false; - return true; + return eh && eh->HasFd(); } |