diff options
author | Pekka Paalanen <pekka.paalanen@collabora.com> | 2019-11-05 15:40:25 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2019-11-21 16:24:01 +0000 |
commit | 4058828b54c6cf46a3e6d1bf90efc98c5ba8d7fa (patch) | |
tree | c6fbb541566e8547ba5b4185c4c6a23524bd6e82 | |
parent | 21627136b233a9163c944f374341374cf852ffcd (diff) | |
download | weston-4058828b54c6cf46a3e6d1bf90efc98c5ba8d7fa.tar.gz weston-4058828b54c6cf46a3e6d1bf90efc98c5ba8d7fa.tar.bz2 weston-4058828b54c6cf46a3e6d1bf90efc98c5ba8d7fa.zip |
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 <pekka.paalanen@collabora.com>
-rw-r--r-- | tests/viewporter-test.c | 5 |
1 files changed, 1 insertions, 4 deletions
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)) |