From: Pekka Paalanen Date: Tue, 5 Nov 2019 14:47:10 +0000 (+0200) Subject: tests: remove static data from ivi-shell-app-test X-Git-Tag: upstream/9.0.0~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9551dd782789d2c582300d4dda226eb1caca05e0;p=platform%2Fupstream%2Fweston.git 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 --- 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"))