summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-02-15 18:00:18 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-02-15 18:03:34 +1000
commit06ef838b5b459eb1d051c3817ad0747b23aaac19 (patch)
treea04ef8ce08f7150670b38ae23f1229537c7ce422
parentb8d4197697c2920bc45b9d00f988c1284452f3d6 (diff)
downloadlibinput-06ef838b5b459eb1d051c3817ad0747b23aaac19.tar.gz
test: drop the needless base event conversion
This was just there to avoid unused variable warnings but the simpler approach to that is to just not assign a variable in the first place. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--test/litest.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/litest.c b/test/litest.c
index 0e83231d..d5eaa270 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -3835,13 +3835,12 @@ litest_assert_pad_button_event(struct libinput *li,
enum libinput_button_state state)
{
struct libinput_event *event;
- struct libinput_event_tablet_pad *pev;
litest_wait_for_event(li);
event = libinput_get_event(li);
- pev = litest_is_pad_button_event(event, button, state);
- libinput_event_destroy(libinput_event_tablet_pad_get_base_event(pev));
+ litest_is_pad_button_event(event, button, state);
+ libinput_event_destroy(event);
}
void
@@ -3850,13 +3849,12 @@ litest_assert_pad_key_event(struct libinput *li,
enum libinput_key_state state)
{
struct libinput_event *event;
- struct libinput_event_tablet_pad *pev;
litest_wait_for_event(li);
event = libinput_get_event(li);
- pev = litest_is_pad_key_event(event, key, state);
- libinput_event_destroy(libinput_event_tablet_pad_get_base_event(pev));
+ litest_is_pad_key_event(event, key, state);
+ libinput_event_destroy(event);
}
void