evdev: fix wrong event mask check 15/133715/1
authorSung-Jin Park <sj76.park@samsung.com>
Tue, 13 Jun 2017 07:30:28 +0000 (16:30 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 13 Jun 2017 07:30:28 +0000 (16:30 +0900)
Change-Id: Icf569cd5fbbf637f94e48831cd24e735d8ac58c7
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/lib/evdev/evdev.c

index 00cc4dc..d7916e4 100644 (file)
@@ -113,7 +113,7 @@ _evdev_keyboard_event_fd_read(int fd, uint32_t mask, void *data)
        struct input_event ev[EVENT_MAX];
        evdev_device_info_t *device_info = (evdev_device_info_t *)data;
 
-       PEPPER_CHECK(mask & (WL_EVENT_HANGUP | WL_EVENT_ERROR),
+       PEPPER_CHECK(!(mask & (WL_EVENT_HANGUP | WL_EVENT_ERROR)),
                                        return 0,
                                        "[%s] With the given fd, there is an error or it's been hung-up.\n",
                                        __FUNCTION__);