[Mesa-dev] [PATCH mesa 1/6] glx: use ARRAY_SIZE macro

Jon Turney jon.turney at dronecode.org.uk
Thu Sep 7 12:00:12 UTC 2017


On 07/09/2017 11:21, Eric Engestrom wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
>   src/glx/driwindows_glx.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/glx/driwindows_glx.c b/src/glx/driwindows_glx.c
> index 02d95e7bfd..85525431bf 100644
> --- a/src/glx/driwindows_glx.c
> +++ b/src/glx/driwindows_glx.c
> @@ -24,6 +24,7 @@
>   #include "glxclient.h"
>   #include "glx_error.h"
>   #include "dri_common.h"
> +#include "util/macros.h"
>   #include "windows/xwindowsdri.h"
>   #include "windows/windowsgl.h"
>   
> @@ -427,7 +428,7 @@ driwindowsBindExtensions(struct driwindows_screen *psc)
>   
>      windows_extensions(&gl_extensions, &wgl_extensions);
>   
> -   for (i = 0; i < sizeof(extensionMap)/sizeof(extensionMap[0]); i++) {
> +   for (i = 0; i < ARRAY_SIZE(extensionMap); i++) {
>         if (strstr(wgl_extensions, extensionMap[i].wglext)) {
>             __glXEnableDirectExtension(&psc->base, extensionMap[i].glxext);
>             InfoMessageF("enabled %s\n", extensionMap[i].glxext);
> 

Reviewed-by: Jon Turney <jon.turney at dronecode.org.uk>


More information about the mesa-dev mailing list