[PATCH xserver 1/6] glx: keep glvnd_vendor a private [static] variable
Emil Velikov
emil.l.velikov at gmail.com
Mon Feb 19 15:18:07 UTC 2018
From: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
glx/glxext.c | 8 +++++---
1 file 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;
}
--
2.16.0
More information about the xorg-devel
mailing list