]> git.zarvox.org Git - libtouchmouse.git/commitdiff
touchmouse_process_events_timeout(): obey documentation's semantics
authorDrew Fisher <drew.m.fisher@gmail.com>
Mon, 14 Nov 2011 19:39:36 +0000 (11:39 -0800)
committerDrew Fisher <drew.m.fisher@gmail.com>
Mon, 14 Nov 2011 19:39:36 +0000 (11:39 -0800)
Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
src/touchmouse.c

index bc7ad4861e21cb9b414dc02e3fe4b2ae563cabf8..3cbd60df98abc7e6804227b3723fcb25b94d3dab 100644 (file)
@@ -337,7 +337,7 @@ int touchmouse_process_events_timeout(touchmouse_device *dev, int milliseconds)
        unsigned char data[256] = {};
        int res;
        uint64_t deadline;
-       if(milliseconds == -1) {
+       if(milliseconds < 0) {
                deadline = (uint64_t)(-1);
        } else {
                deadline = mono_timer_nanos() + (milliseconds * 1000000);