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

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 6 05:57:38 PDT 2014


On Fri, Oct 03, 2014 at 03:01:35PM -0500, Derek Foreman wrote:
> 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;

applied locally, but changed the 0 to false here. thanks

Cheers,
   Peter

>  
>  	switch (event->type) {
>  	case EV_REL:
> -- 
> 2.1.0


More information about the wayland-devel mailing list