From 06e7adfca39d7ff4f557163e5ffa002026f969d3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 Sep 2020 08:42:15 +1000 Subject: [PATCH] tablet: split a ternary condition into a normal if else for readability Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 58ae0a00..d4e3890a 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -1194,8 +1194,10 @@ tablet_notify_button_mask(struct tablet_dispatch *tablet, size_t nbits = 8 * sizeof(buttons->bits); enum libinput_tablet_tool_tip_state tip_state; - tip_state = tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT) ? - LIBINPUT_TABLET_TOOL_TIP_DOWN : LIBINPUT_TABLET_TOOL_TIP_UP; + if (tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT)) + tip_state = LIBINPUT_TABLET_TOOL_TIP_DOWN; + else + tip_state = LIBINPUT_TABLET_TOOL_TIP_UP; for (i = 0; i < nbits; i++) { if (!bit_is_set(buttons->bits, i))