From 9232d4c7997166f69676ea1f96187ed1949650fb Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 4 Jan 2013 19:38:10 +0100 Subject: made valgrind happy by passing valid memory to EVIOCGRAB --- inputdev.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(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)); -- cgit v1.2.3