[Mesa-dev] [PATCH] gbm: make 'devices' array static

Julien Cristau jcristau at debian.org
Mon Mar 3 08:41:56 PST 2014


It's only used in this one file as far as I can tell, and exporting a
symbol named 'devices' from a shared library is a recipe for trouble.
---
 src/gbm/main/gbm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index b057386..30785a6 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -43,7 +43,7 @@
 
 #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
 
-struct gbm_device *devices[16];
+static struct gbm_device *devices[16];
 
 static int device_num = 0;
 
-- 
1.9.0



More information about the mesa-dev mailing list