summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-02-19 15:18:07 +0000
committerAdam Jackson <ajax@redhat.com>2018-02-21 11:07:03 -0500
commit1310241e8d606687811c7394811fe337c3e4de11 (patch)
tree298d77ba6579c45f4d2a80ee66d6ec7ef153e8ad
parenta054532668cbbb152d0d7acfcce1e03e884bb491 (diff)
glx: keep glvnd_vendor a private [static] variable
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--glx/glxext.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index a51c13ff1..37416a4e4 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -497,11 +497,11 @@ xorgGlxServerPreInit(const ExtensionEntry *extEntry)
return glxGeneration == serverGeneration;
}
-static GlxServerVendor *glvnd_vendor = NULL;
-
static GlxServerVendor *
xorgGlxInitGLVNDVendor(void)
{
+ static GlxServerVendor *glvnd_vendor = NULL;
+
if (glvnd_vendor == NULL) {
GlxServerImports *imports = NULL;
imports = glxServer.allocateServerImports();
@@ -521,6 +521,7 @@ xorgGlxInitGLVNDVendor(void)
static void
xorgGlxServerInit(CallbackListPtr *pcbl, void *param, void *ext)
{
+ GlxServerVendor *glvnd_vendor;
const ExtensionEntry *extEntry = ext;
int i;
@@ -528,7 +529,8 @@ xorgGlxServerInit(CallbackListPtr *pcbl, void *param, void *ext)
return;
}
- if (!xorgGlxInitGLVNDVendor()) {
+ glvnd_vendor = xorgGlxInitGLVNDVendor();
+ if (!glvnd_vendor) {
return;
}