diff --git a/legacy/eeze/src/lib/udev/eeze_udev_watch.c b/legacy/eeze/src/lib/udev/eeze_udev_watch.c index 35ffa1cf44..d189fc03b8 100644 --- a/legacy/eeze/src/lib/udev/eeze_udev_watch.c +++ b/legacy/eeze/src/lib/udev/eeze_udev_watch.c @@ -71,9 +71,9 @@ _get_syspath_from_watch(void *data, Ecore_Fd_Handler *fd_handler) if ((!(test = udev_device_get_subsystem(device))) || (strcmp(test, "input"))) goto error; test = udev_device_get_property_value(device, "ID_CLASS"); - if ((!_walk_parents_for_attr(device, "bInterfaceProtocol", "01")) && ((!test) || (strcmp(test, "kbd")))) - goto error; - break; + if ((_walk_parents_for_attr(device, "bInterfaceProtocol", "01")) || ((test) && (!strcmp(test, "kbd")))) + break; + goto error; #endif if (!udev_device_get_property_value(device, "ID_INPUT_KEYBOARD")) goto error; @@ -83,9 +83,9 @@ _get_syspath_from_watch(void *data, Ecore_Fd_Handler *fd_handler) if ((!(test = udev_device_get_subsystem(device))) || (strcmp(test, "input"))) goto error; test = udev_device_get_property_value(device, "ID_CLASS"); - if ((!_walk_parents_for_attr(device, "bInterfaceProtocol", "02")) && ((!test) || (strcmp(test, "mouse")))) - goto error; - break; + if ((_walk_parents_for_attr(device, "bInterfaceProtocol", "02")) || ((test) && (!strcmp(test, "mouse")))) + break; + goto error; #endif if (!udev_device_get_property_value(device, "ID_INPUT_MOUSE")) goto error;