egl: remove unnecessary empty array element
authorEric Engestrom <eric@engestrom.ch>
Sun, 30 Jul 2017 01:11:59 +0000 (02:11 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 1 Aug 2017 16:43:15 +0000 (17:43 +0100)
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/main/egldriver.c

index b9b21dec5ea5903ff2606fec48b6ba84caaa3b0a..60753bb22e92e2707bf37fc47472426c4d737a4d 100644 (file)
@@ -63,7 +63,6 @@ const struct {
 #ifdef _EGL_BUILT_IN_DRIVER_HAIKU
    { "egl_haiku", _eglBuiltInDriverHaiku },
 #endif
-   { NULL, NULL }
 };
 
 /**
@@ -172,7 +171,7 @@ _eglAddUserDriver(void)
    if (env) {
       EGLint i;
 
-      for (i = 0; _eglBuiltInDrivers[i].name; i++) {
+      for (i = 0; i < ARRAY_SIZE(_eglBuiltInDrivers); i++) {
          if (!strcmp(_eglBuiltInDrivers[i].name, env)) {
             _EGLModule *mod = _eglAddModule(env);
             if (mod)
@@ -196,7 +195,7 @@ _eglAddBuiltInDrivers(void)
    _EGLModule *mod;
    EGLint i;
 
-   for (i = 0; _eglBuiltInDrivers[i].name; i++) {
+   for (i = 0; i < ARRAY_SIZE(_eglBuiltInDrivers); i++) {
       mod = _eglAddModule(_eglBuiltInDrivers[i].name);
       if (mod)
          mod->BuiltIn = _eglBuiltInDrivers[i].main;