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>
dev
Pekka Paalanen 5 years ago committed by Daniel Stone
parent 21627136b2
commit 4058828b54
  1. 5
      tests/viewporter-test.c

@ -41,10 +41,7 @@ get_viewporter(struct client *client)
{ {
struct global *g; struct global *g;
struct global *global_wpr = NULL; struct global *global_wpr = NULL;
static struct wp_viewporter *wpr; struct wp_viewporter *wpr;
if (wpr)
return wpr;
wl_list_for_each(g, &client->global_list, link) { wl_list_for_each(g, &client->global_list, link) {
if (strcmp(g->interface, wp_viewporter_interface.name)) if (strcmp(g->interface, wp_viewporter_interface.name))

Loading…
Cancel
Save