egl/surfaceless: Fix comparison between pointer and integer
authorChad Versace <chadversary@chromium.org>
Fri, 14 Oct 2016 22:05:19 +0000 (15:05 -0700)
committerChad Versace <chadversary@chromium.org>
Sun, 16 Oct 2016 16:03:31 +0000 (09:03 -0700)
Fixes GCC warning:
  drivers/dri2/platform_surfaceless.c:196:18: warning: comparison
      between pointer and integer

Fixes: 4b8a55809eb ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()")
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/platform_surfaceless.c

index f891d91796d5f46b4434395c984cf8392eceab65..fcf7d697019c3fa1def5e99051242f6911e8a1ac 100644 (file)
@@ -193,7 +193,7 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
    unsigned int count, i, j;
 
    count = 0;
-   for (i = 0; i < dri2_dpy->driver_configs[i]; i++) {
+   for (i = 0; dri2_dpy->driver_configs[i] != NULL; i++) {
       for (j = 0; j < ARRAY_SIZE(visuals); j++) {
          struct dri2_egl_config *dri2_conf;