diff options
author | Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | 2013-01-04 19:38:10 +0100 |
---|---|---|
committer | Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | 2013-01-04 19:38:10 +0100 |
commit | 9232d4c7997166f69676ea1f96187ed1949650fb (patch) | |
tree | 690472d82faa4063e7b534bd1d62f0f80514faef | |
parent | 6bc3e5894a61967e655f6d2452d2331881f0423b (diff) | |
download | vdr-plugin-inputdev-9232d4c7997166f69676ea1f96187ed1949650fb.tar.gz vdr-plugin-inputdev-9232d4c7997166f69676ea1f96187ed1949650fb.tar.bz2 |
made valgrind happy by passing valid memory to EVIOCGRAB
-rw-r--r-- | inputdev.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inputdev.cc b/inputdev.cc index 2f9ea72..a65f97e 100644 --- a/inputdev.cc +++ b/inputdev.cc @@ -385,6 +385,7 @@ err: bool cInputDevice::start(int efd) { + static unsigned int const ONE = 1; int rc; struct epoll_event ev = { }; char const *dev_path = dev_path_; @@ -392,7 +393,7 @@ bool cInputDevice::start(int efd) ev.events = EPOLLIN; ev.data.ptr = static_cast<cEpollHandler *>(this); - rc = ioctl(fd_, EVIOCGRAB, 1); + rc = ioctl(fd_, EVIOCGRAB, &ONE); if (rc < 0) { esyslog("%s: ioctl(GRAB, <%s>) failed: %s\n", controller_.plugin_name(), dev_path, strerror(errno)); |