[Mesa-dev] [PATCH 7/7] egl: use designated initializers

Emil Velikov emil.l.velikov at gmail.com
Thu May 4 18:47:02 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

All the compilers used to build Mesa support them.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/egl/main/egllog.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c
index c1e61f9b6c9..917aae3134e 100644
--- a/src/egl/main/egllog.c
+++ b/src/egl/main/egllog.c
@@ -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",
 };
 
 
-- 
2.12.2



More information about the mesa-dev mailing list