[PATCH libinput] cosmetic: convert evdev_need_touch_frame from int to bool

Derek Foreman derekf at osg.samsung.com
Fri Oct 3 13:01:35 PDT 2014


We use stdbool elsewhere, so use it here too for consistency.
---
 src/evdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index d8e3e5a..1b4ce10 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -577,11 +577,11 @@ evdev_process_absolute(struct evdev_device *device,
 	}
 }
 
-static inline int
+static inline bool
 evdev_need_touch_frame(struct evdev_device *device)
 {
 	if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
-		return 0;
+		return false;
 
 	switch (device->pending_event) {
 	case EVDEV_NONE:
@@ -593,10 +593,10 @@ evdev_need_touch_frame(struct evdev_device *device)
 	case EVDEV_ABSOLUTE_TOUCH_DOWN:
 	case EVDEV_ABSOLUTE_TOUCH_UP:
 	case EVDEV_ABSOLUTE_MOTION:
-		return 1;
+		return true;
 	}
 
-	return 0;
+	return false;
 }
 
 static void
@@ -626,7 +626,7 @@ fallback_process(struct evdev_dispatch *dispatch,
 		 struct input_event *event,
 		 uint64_t time)
 {
-	int need_frame = 0;
+	bool need_frame = 0;
 
 	switch (event->type) {
 	case EV_REL:
-- 
2.1.0



More information about the wayland-devel mailing list