mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 23:58:44 +02:00
test: move litest_free_test_list to inside ifndef NO_MAIN
This is now only called from one spot, so let's move it so it is ifdef'd out. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1067>
This commit is contained in:
parent
0cfde0f95f
commit
27fa85a884
1 changed files with 21 additions and 21 deletions
|
|
@ -889,27 +889,6 @@ static struct libinput_interface interface = {
|
||||||
.close_restricted = close_restricted,
|
.close_restricted = close_restricted,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
|
||||||
litest_free_test_list(struct list *tests)
|
|
||||||
{
|
|
||||||
struct suite *s;
|
|
||||||
|
|
||||||
list_for_each_safe(s, tests, node) {
|
|
||||||
struct test *t;
|
|
||||||
|
|
||||||
list_for_each_safe(t, &s->tests, node) {
|
|
||||||
free(t->name);
|
|
||||||
free(t->devname);
|
|
||||||
list_remove(&t->node);
|
|
||||||
free(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
list_remove(&s->node);
|
|
||||||
free(s->name);
|
|
||||||
free(s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBINPUT_ATTRIBUTE_PRINTF(3, 0)
|
LIBINPUT_ATTRIBUTE_PRINTF(3, 0)
|
||||||
static inline void
|
static inline void
|
||||||
quirk_log_handler(struct libinput *unused,
|
quirk_log_handler(struct libinput *unused,
|
||||||
|
|
@ -4813,6 +4792,27 @@ restore_tty(int tty_mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
litest_free_test_list(struct list *tests)
|
||||||
|
{
|
||||||
|
struct suite *s;
|
||||||
|
|
||||||
|
list_for_each_safe(s, tests, node) {
|
||||||
|
struct test *t;
|
||||||
|
|
||||||
|
list_for_each_safe(t, &s->tests, node) {
|
||||||
|
free(t->name);
|
||||||
|
free(t->devname);
|
||||||
|
list_remove(&t->node);
|
||||||
|
free(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
list_remove(&s->node);
|
||||||
|
free(s->name);
|
||||||
|
free(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue