summaryrefslogtreecommitdiff
path: root/inputdev.cc
diff options
context:
space:
mode:
Diffstat (limited to 'inputdev.cc')
-rw-r--r--inputdev.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/inputdev.cc b/inputdev.cc
index 4ddf6e1..30a15af 100644
--- a/inputdev.cc
+++ b/inputdev.cc
@@ -580,10 +580,12 @@ char const *cInputDeviceController::plugin_name(void) const
return plugin_.Name();
}
-void cInputDeviceController::close(int fd)
+void cInputDeviceController::close(int &fd)
{
- if (fd != -1)
+ if (fd != -1) {
::close(fd);
+ fd = -1;
+ }
}
bool cInputDeviceController::open_generic(int fd_udev)
@@ -980,6 +982,5 @@ void cInputDeviceController::stop(void)
{
Cancel(-1);
this->close(fd_epoll_);
- fd_epoll_ = -1;
Cancel(5);
}