egl: use designated initializers
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 31 Mar 2017 11:08:38 +0000 (12:08 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 8 May 2017 14:34:21 +0000 (15:34 +0100)
All the compilers used to build Mesa support them.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/egl/main/egllog.c

index 7af381830ed14a8913ffdf0584a6efeba6df4e6b..bf0ee017b891ee31a82a53f249cc490ba4f813e0 100644 (file)
@@ -72,17 +72,16 @@ static struct {
    EGLBoolean initialized;
    EGLint level;
 } logging = {
-   _MTX_INITIALIZER_NP,
-   EGL_FALSE,
-   FALLBACK_LOG_LEVEL,
+   .mutex = _MTX_INITIALIZER_NP,
+   .initialized = EGL_FALSE,
+   .level = FALLBACK_LOG_LEVEL,
 };
 
 static const char *level_strings[] = {
-   /* the order is important */
-   "fatal",
-   "warning",
-   "info",
-   "debug",
+   [_EGL_FATAL] = "fatal",
+   [_EGL_WARNING]  = "warning",
+   [_EGL_INFO] = "info",
+   [_EGL_DEBUG] = "debug",
 };