diff options
author | Emil Velikov <[email protected]> | 2017-05-04 19:34:43 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-08 15:34:09 +0100 |
commit | 54f619fb9b558609d433cba6c619c3136eede57d (patch) | |
tree | 68ecfbb7714af77ba3bc6355e9fd9187c7c99f66 | |
parent | 239e7ee91bd324bf82a37924546c4ea472e2dd2b (diff) |
egl: drop unneeded sentinel from level_strings[]
The array is local so we already know its size.
v2: Correct loop condition (Bartosz)
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
-rw-r--r-- | src/egl/main/egllog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c index 6f0c0cda6c3..7af381830ed 100644 --- a/src/egl/main/egllog.c +++ b/src/egl/main/egllog.c @@ -41,6 +41,7 @@ #include <string.h> #include <strings.h> #include "c11/threads.h" +#include "util/macros.h" #include "egllog.h" @@ -82,7 +83,6 @@ static const char *level_strings[] = { "warning", "info", "debug", - NULL }; @@ -129,7 +129,7 @@ _eglInitLogger(void) log_env = getenv("EGL_LOG_LEVEL"); if (log_env) { - for (i = 0; level_strings[i]; i++) { + for (i = 0; i < ARRAY_SIZE(level_strings); i++) { if (strcasecmp(log_env, level_strings[i]) == 0) { level = i; break; |