From: Pekka Paalanen Date: Tue, 5 Nov 2019 13:40:25 +0000 (+0200) Subject: tests: remove static data from viewporter X-Git-Tag: upstream/9.0.0~272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4058828b54c6cf46a3e6d1bf90efc98c5ba8d7fa;p=platform%2Fupstream%2Fweston.git tests: remove static data from viewporter This caching is actually never hit. I tested by making the early return abort() instead and all works just fine. Remove the caching. The static variable will cause problems when we stop fork()'ing for each test case. Signed-off-by: Pekka Paalanen --- diff --git a/tests/viewporter-test.c b/tests/viewporter-test.c index 95fb9b46..f9b19d9e 100644 --- a/tests/viewporter-test.c +++ b/tests/viewporter-test.c @@ -41,10 +41,7 @@ get_viewporter(struct client *client) { struct global *g; struct global *global_wpr = NULL; - static struct wp_viewporter *wpr; - - if (wpr) - return wpr; + struct wp_viewporter *wpr; wl_list_for_each(g, &client->global_list, link) { if (strcmp(g->interface, wp_viewporter_interface.name))