Mesa (master): gbm: make 'devices' array static

Emil Velikov evelikov at kemper.freedesktop.org
Sat Mar 8 20:43:02 UTC 2014


Module: Mesa
Branch: master
Commit: cf1c52575d6fea966d818eac4a32ec2decc48576
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf1c52575d6fea966d818eac4a32ec2decc48576

Author: Julien Cristau <jcristau at debian.org>
Date:   Mon Mar  3 17:41:56 2014 +0100

gbm: make 'devices' array static

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.

Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 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;
 




More information about the mesa-commit mailing list