summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-08-27 01:17:24 -0700
committerRosen Penev <rosenp@gmail.com>2020-08-27 01:17:24 -0700
commit467752047ebfa2f82195f6bf80956483bd832100 (patch)
tree6721fcfe69964f4c62829a885a9fe9a5cd3c0a80 /src/evdev.c
parentcd71a73d6246dc1b54429804df8da969c73d9656 (diff)
downloadlibinput-467752047ebfa2f82195f6bf80956483bd832100.tar.gz
[clang-tidy] do not use else after return
Found with readability-else-after-return Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 453c89a0..c3c02d2a 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -763,8 +763,8 @@ evdev_scroll_get_button_lock(struct libinput_device *device)
if (evdev->scroll.lock_state == BUTTONSCROLL_LOCK_DISABLED)
return LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED;
- else
- return LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED;
+
+ return LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED;
}
static enum libinput_config_scroll_button_lock_state
@@ -1806,7 +1806,9 @@ evdev_configure_device(struct evdev_device *device)
evdev_log_info(device,
"device is an accelerometer, ignoring\n");
return NULL;
- } else if (udev_tags & EVDEV_UDEV_TAG_ACCELEROMETER) {
+ }
+
+ if (udev_tags & EVDEV_UDEV_TAG_ACCELEROMETER) {
evdev_disable_accelerometer_axes(device);
}
@@ -1853,7 +1855,9 @@ evdev_configure_device(struct evdev_device *device)
evdev_log_info(device, "device is a tablet pad\n");
return dispatch;
- } else if ((udev_tags & tablet_tags) == EVDEV_UDEV_TAG_TABLET) {
+ }
+
+ if ((udev_tags & tablet_tags) == EVDEV_UDEV_TAG_TABLET) {
dispatch = evdev_tablet_create(device);
device->seat_caps |= EVDEV_DEVICE_TABLET;
evdev_log_info(device, "device is a tablet\n");