From 9551dd782789d2c582300d4dda226eb1caca05e0 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 5 Nov 2019 16:47:10 +0200 Subject: [PATCH] tests: remove static data from ivi-shell-app-test Just one test call this only once, so the cached value will never be useful. Stop using static data, it sets a bad example. If more tests were added, things would start failing when forking is removed from the test harness. Signed-off-by: Pekka Paalanen --- tests/ivi-shell-app-test.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/ivi-shell-app-test.c b/tests/ivi-shell-app-test.c index 5bef7656..9fefb5f0 100644 --- a/tests/ivi-shell-app-test.c +++ b/tests/ivi-shell-app-test.c @@ -36,10 +36,7 @@ get_ivi_application(struct client *client) { struct global *g; struct global *global_iviapp = NULL; - static struct ivi_application *iviapp; - - if (iviapp) - return iviapp; + struct ivi_application *iviapp; wl_list_for_each(g, &client->global_list, link) { if (strcmp(g->interface, "ivi_application"))