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

Emil Velikov emil.l.velikov at gmail.com
Mon Mar 3 09:21:15 PST 2014


On 03/03/14 16:41, Julien Cristau wrote:
> 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.
Hmm did you really get the 'devices' exported symbol, or did you notice
this while going through the code ? Either way this looks good afaict

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-dev mailing list